user

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2015 License: AGPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	LoginKeys db.Bucket = "user-login-keys"
)
View Source
const (
	Users db.Bucket = "user-users"
)

Variables

This section is empty.

Functions

func Buckets

func Buckets() []db.Bucket

func CheckUser

func CheckUser(d db.DB, email, pwhash string) error

func ClearLogin

func ClearLogin(d db.DB, email string) error

func Create

func Create(d db.DB, email, pwhash string) error

func Delete

func Delete(d db.DB, email string) error

func GetTimeout

func GetTimeout() time.Duration

func LoginUser

func LoginUser(d db.DB, email, pwhash string) (util.Key, error)

func LogoutUser

func LogoutUser(d db.DB, email string, key util.Key) error

func SetTimeout

func SetTimeout(t time.Duration)

func ValidLogin

func ValidLogin(d db.DB, email string, key util.Key) error

Types

type Login

type Login struct {
	Key     util.Key  `json:"key,omitempty"`
	Timeout time.Time `json:"timeout,omitempty"`
}

func GetLogin

func GetLogin(d db.DB, email string) (*Login, error)

type User

type User struct {
	Email string    `json:"email,omitempty"`
	Salt  util.Salt `json:"salt,omitempty"`
	Hash  util.Hash `json:"hash,omitempty"`
	Key   util.Key  `json:"key,omitempty"`
}

func Get

func Get(d db.DB, email string) (*User, error)

Jump to

Keyboard shortcuts

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