Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
func NewDBAuthenticator ¶
func NewDBAuthenticator(config *conf.GlobalConfig, db *sql.DB) (Authenticator, error)
func NewMixedAuthenticator ¶
func NewMixedAuthenticator(config *conf.GlobalConfig, db *sql.DB) (Authenticator, error)
type ConfigUserAuthenticator ¶
type ConfigUserAuthenticator struct { Config *conf.GlobalConfig Authenticator }
func (*ConfigUserAuthenticator) CheckHash ¶
func (a *ConfigUserAuthenticator) CheckHash(hash string) bool
func (*ConfigUserAuthenticator) Close ¶
func (a *ConfigUserAuthenticator) Close() error
type DBAuthenticator ¶
type DBAuthenticator struct { Authenticator // contains filtered or unexported fields }
func (*DBAuthenticator) CheckHash ¶
func (a *DBAuthenticator) CheckHash(hash string) bool
func (*DBAuthenticator) Close ¶
func (a *DBAuthenticator) Close() error
type DBTrafficMeter ¶
type DBTrafficMeter struct { TrafficMeter // contains filtered or unexported fields }
func (*DBTrafficMeter) Close ¶
func (c *DBTrafficMeter) Close() error
type MemoryTrafficMeter ¶ added in v0.1.5
type MemoryTrafficMeter struct { TrafficMeter // contains filtered or unexported fields }
func (*MemoryTrafficMeter) Count ¶ added in v0.1.5
func (m *MemoryTrafficMeter) Count(passwordHash string, sent, recv uint64)
type MixedAuthenticator ¶
type MixedAuthenticator struct { Authenticator // contains filtered or unexported fields }
func (*MixedAuthenticator) CheckHash ¶
func (a *MixedAuthenticator) CheckHash(hash string) bool
func (*MixedAuthenticator) Close ¶
func (a *MixedAuthenticator) Close() error
type TrafficMeter ¶
type TrafficMeter interface { Count(passwordHash string, sent uint64, recv uint64) Query(passwordHash string) (sent uint64, recv uint64) io.Closer }
func NewDBTrafficMeter ¶
func NewDBTrafficMeter(config *conf.GlobalConfig, db *sql.DB) (TrafficMeter, error)
Click to show internal directories.
Click to hide internal directories.