db

package
v0.0.0-...-8c9ab3b Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New(log logr.Logger, cfg *core.Config) (db *DB, err error)

func NewPlain

func NewPlain(log logr.Logger, cfg *core.Config) (db *DB, err error)

func (*DB) Add

func (db *DB) Add(sig string, exp int64) error

func (*DB) AdminUpdateUser

func (db *DB) AdminUpdateUser(username, password string, admin, disabled bool) error

func (*DB) Check

func (db *DB) Check(sig string) (ok bool)

func (*DB) Close

func (db *DB) Close() error

func (*DB) CreateUser

func (db *DB) CreateUser(username, email, password string, admin, disabled bool) error

func (*DB) DeleteUser

func (db *DB) DeleteUser(username string) error

func (*DB) Dump

func (db *DB) Dump(w io.Writer) error

func (*DB) GetUser

func (db *DB) GetUser(username string) (u *core.User, err error)

func (*DB) GetUserSecret

func (db *DB) GetUserSecret(username string) (secret string, err error)

func (*DB) GetUserWithoutSecrets

func (db *DB) GetUserWithoutSecrets(username string) (u *core.User, err error)

func (*DB) GetUsers

func (db *DB) GetUsers() (users core.Users, err error)

func (*DB) LockedOut

func (db *DB) LockedOut(username, created string) bool

func (*DB) Login

func (db *DB) Login(username, password string) (u *core.User, err error)

func (*DB) Map

func (db *DB) Map() (list jwt.BlacklistMap, err error)

func (*DB) Remove

func (db *DB) Remove(sig string) error

func (*DB) ResetAdmin

func (db *DB) ResetAdmin() error

func (*DB) Restore

func (db *DB) Restore(r io.Reader) error

func (*DB) RunMigrations

func (db *DB) RunMigrations() (err error)

func (*DB) Totp

func (db *DB) Totp(username, pin string) (u *core.User, err error)

func (*DB) UnlockUser

func (db *DB) UnlockUser(username string) (err error)

func (*DB) UpdateUserPassword

func (db *DB) UpdateUserPassword(username, password string) error

func (*DB) UpdateUserSecret

func (db *DB) UpdateUserSecret(username, secret string) error

func (*DB) UserExists

func (db *DB) UserExists(username string) error

Jump to

Keyboard shortcuts

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