files

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDatabase

func CheckDatabase() error

Types

type Database

type Database map[Username]DatabaseRecord

func LoadDatabase

func LoadDatabase(path string) (Database, error)

func LoadDefaultDatabase

func LoadDefaultDatabase() (Database, error)

func (Database) Save

func (db Database) Save() error

type DatabaseRecord

type DatabaseRecord struct {
	Username   Username `yaml:"username"`
	Hash       string   `yaml:"hash"`
	TotpSecret string   `yaml:"totp-secret"`
}

type LoginRequest

type LoginRequest struct {
	Username  Username `yaml:"username"`
	Password  string   `yaml:"password"`
	TotpNonce string   `yaml:"totp-nonce"`
}

func ParseLoginRequest

func ParseLoginRequest(filename string) (*LoginRequest, error)

type Username

type Username string

Jump to

Keyboard shortcuts

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