Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
func NewBoltStore ¶
func (*BoltStore) LoadTraffic ¶
func (b *BoltStore) LoadTraffic() (map[string]UserTotals, error)
func (*BoltStore) ResetUserTraffic ¶
func (*BoltStore) SaveTraffic ¶
func (b *BoltStore) SaveTraffic(totals map[string]UserTotals) error
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) AddDownload ¶
func (*Session) DownloadBytes ¶
func (*Session) UploadBytes ¶
type Store ¶
type Store interface {
LoadTraffic() (map[string]UserTotals, error)
SaveTraffic(totals map[string]UserTotals) error
ResetUserTraffic(username string) error
}
Store persists per-user traffic totals across restarts.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
func NewTracker ¶
func NewTracker() *Tracker
func (*Tracker) LoadPersistedTotals ¶
func (*Tracker) ResetUserStats ¶
func (*Tracker) TotalsByUser ¶
func (t *Tracker) TotalsByUser() map[string]UserTotals
Click to show internal directories.
Click to hide internal directories.