stat

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	CheckHash(hash string) bool
	io.Closer
}

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

func (*DBTrafficMeter) Count

func (c *DBTrafficMeter) Count(passwordHash string, sent uint64, recv uint64)

func (*DBTrafficMeter) Query added in v0.1.5

func (c *DBTrafficMeter) Query(passwordHash string) (uint64, uint64)

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)

func (*MemoryTrafficMeter) Query added in v0.1.5

func (m *MemoryTrafficMeter) Query(passwordHash string) (uint64, 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL