users

package
v0.0.0-...-63b66d1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("User not found")
)

Functions

func AddUser

func AddUser(username, password string) error

func CheckPassword

func CheckPassword(username, password string) bool

Types

type User

type User struct {
	Name     string
	Password string
	Mail     string
	Groups   []string
}

type UserCfg

type UserCfg struct {
	config.Config
}

func ReadUserCfg

func ReadUserCfg() (result *UserCfg, err error)

func (*UserCfg) GetUser

func (cfg *UserCfg) GetUser(username string) (*User, error)

func (*UserCfg) GetUsers

func (cfg *UserCfg) GetUsers() ([]*User, error)

func (*UserCfg) UpdateUser

func (cfg *UserCfg) UpdateUser(user *User) error

Jump to

Keyboard shortcuts

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