Versions in this module Expand all Collapse all v0 v0.11.0 Nov 7, 2022 Changes in this version + const Name + func NewAuthenticator(ctx context.Context) (statistic.Authenticator, error) + type Authenticator struct + func (a *Authenticator) AddUser(hash string) error + func (a *Authenticator) AuthUser(hash string) (bool, statistic.User) + func (a *Authenticator) Close() error + func (a *Authenticator) DelUser(hash string) error + func (a *Authenticator) ListUsers() []statistic.User + type Config struct + Passwords []string + type User struct + func (u *User) AddIP(ip string) bool + func (u *User) AddTraffic(sent, recv int) + func (u *User) Close() error + func (u *User) DelIP(ip string) bool + func (u *User) GetIP() int + func (u *User) GetIPLimit() int + func (u *User) GetSpeed() (uint64, uint64) + func (u *User) GetSpeedLimit() (send, recv int) + func (u *User) GetTraffic() (uint64, uint64) + func (u *User) Hash() string + func (u *User) ResetTraffic() (uint64, uint64) + func (u *User) SetIPLimit(n int) + func (u *User) SetSpeedLimit(send, recv int) + func (u *User) SetTraffic(send, recv uint64)