goyamlpasswd

package module
v0.0.0-...-1ba5a0d Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_NOT_FOUND        = errors.New("not found")
	ERR_PASSWORD_NOT_SET = errors.New("password not sed")
)

Functions

This section is empty.

Types

type YAMLAuthFile

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

func NewYAMLAuthFile

func NewYAMLAuthFile(filename string) *YAMLAuthFile

func (*YAMLAuthFile) CheckUserPasswordMatch

func (self *YAMLAuthFile) CheckUserPasswordMatch(user, password string) (ok bool, err error)

func (*YAMLAuthFile) Load

func (self *YAMLAuthFile) Load() error

func (*YAMLAuthFile) LoadIfChanged

func (self *YAMLAuthFile) LoadIfChanged() (bool, error)

func (*YAMLAuthFile) PutRecord

func (self *YAMLAuthFile) PutRecord(r *YAMLAuthFileSRecord)

func (*YAMLAuthFile) RemoveRecord

func (self *YAMLAuthFile) RemoveRecord(name string)

func (*YAMLAuthFile) Save

func (self *YAMLAuthFile) Save() error

func (*YAMLAuthFile) UserByKey

func (self *YAMLAuthFile) UserByKey(key string) (user string, err error)

type YAMLAuthFileS

type YAMLAuthFileS struct {
	Records []*YAMLAuthFileSRecord
}

type YAMLAuthFileSRecord

type YAMLAuthFileSRecord struct {
	User     string
	Password *string `yaml:",omitempty"`
	Key      *string `yaml:",omitempty"`
}

Directories

Path Synopsis
tests
01

Jump to

Keyboard shortcuts

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