Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthCreator ¶ added in v0.4.3
func RegisterAuthCreator(name string, creator AuthCreator)
Types ¶
type AuthCreator ¶ added in v0.4.3
type AuthCreator func(ctx context.Context, config *conf.GlobalConfig) (Authenticator, error)
type Authenticator ¶
type Authenticator interface { io.Closer AuthUser(hash string) (valid bool, meter TrafficMeter) AddUser(hash string) error DelUser(hash string) error ListUsers() []TrafficMeter }
func NewAuth ¶ added in v0.4.3
func NewAuth(ctx context.Context, name string, config *conf.GlobalConfig) (Authenticator, error)
Click to show internal directories.
Click to hide internal directories.