user

package
v0.1.0-dev-777099b Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomString

func RandomString(n int) string

Types

type Manager

type Manager interface {
	Get(username string) (*User, error)
	Put(user *User) error
	List() ([]User, error)
	New(user *User) error
	Delete(username string) error
}

func NewManager

func NewManager(kv store.Store, conf *config.Config) (Manager, error)

type Password

type Password struct {
	Data string
	Salt string
}

func NewPassword

func NewPassword(origin string) *Password

func (*Password) Check

func (p *Password) Check(b string) bool

func (*Password) Set

func (p *Password) Set(b string)

type User

type User struct {
	Id       string
	Password *Password
	Email    string
	Role     string
}

Jump to

Keyboard shortcuts

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