userconfig

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	UUID      string
	LoginName string
	Name      string
	PWDHash   string
	Groups    []string
	State     UserState
	Lang      string
	Comment   string
}

User stores all information about a single user

type UserConfig

type UserConfig struct {
	Header config.FileHeader
	User   []User
}

func (*UserConfig) Add

func (c *UserConfig) Add(u User)

func (*UserConfig) Delete

func (c *UserConfig) Delete(uid string)

func (*UserConfig) Edit

func (c *UserConfig) Edit(u User) error

func (*UserConfig) Get

func (c *UserConfig) Get(uid string) (User, error)

func (*UserConfig) GetUUIDList

func (c *UserConfig) GetUUIDList() []string

func (*UserConfig) GetUserCnt

func (c *UserConfig) GetUserCnt() int

func (*UserConfig) GetWithName

func (c *UserConfig) GetWithName(name string) (User, error)

func (*UserConfig) GetWithState

func (c *UserConfig) GetWithState(state UserState) (User, error)

func (*UserConfig) List

func (c *UserConfig) List() []User

func (*UserConfig) LoadConfig

func (c *UserConfig) LoadConfig() error

func (UserConfig) SaveConfig

func (c UserConfig) SaveConfig() error

type UserState

type UserState int
const (
	StatePublic UserState = 0 + iota
	StateActive
	StateInactive
)

Jump to

Keyboard shortcuts

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