Documentation
¶
Index ¶
- Constants
- Variables
- func Init(wikiDir string) error
- type Config
- type ConfigWiki
- type User
- type UserList
- func (ul *UserList) Authenticate(username string, password string) (*User, error)
- func (ul *UserList) Commit() error
- func (ul *UserList) GetUser(username string) (*User, error)
- func (ul *UserList) ReadDatabase(dbFile string) error
- func (ul *UserList) Register(username string, password string, fullName string, email string) error
Constants ¶
View Source
const ( CONFIG_FILE = "config.yaml" USERS_DB_FILE = "users.db" )
Constants
Variables ¶
View Source
var ( Users *UserList Conf *Config )
View Source
var ( ErrInvalidUser = errors.New("user does not exist") ErrUserExists = errors.New("user exists") ErrIncorrectPassword = errors.New("incorrect password") ErrUserDisabled = errors.New("user account is disabled") )
Error definitions
Functions ¶
Types ¶
type Config ¶
type Config struct { Wiki ConfigWiki `yaml:"wiki"` Files configFiles Server configServer `yaml:"server"` }
Configuration structs
func (*Config) ParseConfig ¶
type ConfigWiki ¶
type UserList ¶
func (*UserList) Authenticate ¶
Authenticate using username and password
func (*UserList) ReadDatabase ¶
ReadAuthDatabase - reads the database file
Click to show internal directories.
Click to hide internal directories.