Documentation
¶
Overview ¶
Package config provides all the config management
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownUser = errors.New("unknown user")
ErrUnknownUser is returned when the provided user cannot be identified through our authentication mechanism
Functions ¶
func HashPassword ¶ added in v0.16.5
HashPassword returns the bcrypt hash of a plain-text password, in the format expected in the config file
Types ¶
type Config ¶
Config provides the general server config
func FromContent ¶ added in v0.12.0
FromContent creates a new config instance from a pre-created Content and logger. The fileName should indicate origin of the given Content, but the file will never be opened.
func (*Config) CheckAccesses ¶
CheckAccesses checks all accesses
func (*Config) GetAccess ¶
GetAccess return a file system access given some credentials. Accesses are evaluated in their declaration order.
func (*Config) HashPlaintextPasswords ¶ added in v0.13.0
HashPlaintextPasswords replaces all the plain-text passwords of the config file by their bcrypt equivalent, and saves the config file.