Documentation
¶
Index ¶
- type Counter
- func (c *Counter) AddEntry(section *Section, entry *Entry) bool
- func (c *Counter) GetSection(username string, repository string) *Section
- func (c *Counter) GetSectionByKey(sectionKey string) *Section
- func (c *Counter) Increment(section *Section)
- func (c *Counter) RemoveEntry(section *Section, hash string)
- func (c *Counter) RemoveSection(sectionKey string)
- func (c *Counter) Run()
- type Entry
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct { Sections map[string]*Section `json:"sections"` File string `json:"-"` Duration time.Duration `json:"-"` }
func NewCounter ¶
func (*Counter) GetSection ¶
func (*Counter) GetSectionByKey ¶
func (*Counter) RemoveEntry ¶
func (*Counter) RemoveSection ¶
type Section ¶
type Section struct { XMLName xml.Name `xml:"Section" json:"-"` Username string `json:"username"` Repository string `json:"repository"` Total int64 `json:"total"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Entries map[string]*Entry `xml:"-" json:"-"` File string `xml:"-" json:"-"` }
func NewSection ¶
Click to show internal directories.
Click to hide internal directories.