user

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LENGTH        = 64
	UNAME_L_LIMIT = 3
	UNAME_U_LIMIT = 16
	UNAME_REX     = "^[A-Za-z0-9\\-_\\.]+$"
)

* Global constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	AddPermission(name string, permission string) error
	CreateUser(name string) error
	Export() ([]byte, error)
	Hash(name string) ([]byte, error)
	HasPermission(name string, permission string) (bool, error)
	Import(buf []byte) error
	Nonce(name string) ([LENGTH]byte, error)
	Permissions(name string) ([]string, error)
	RegenerateNonce(name string) error
	RemovePermission(name string, permission string) error
	RemoveUser(name string) error
	Salt(name string) ([LENGTH]byte, error)
	SetPassword(name string, password string) error
	UserExists(name string) bool
	Users() []string
}

* A user manager.

func CreateManager

func CreateManager(prng io.Reader) (Manager, error)

* Creates a new user manager.

Jump to

Keyboard shortcuts

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