store

package
v0.0.0-...-237ae9d Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmailDuplication = errors.New("The email is already in the store")
	ErrUserNotFound     = errors.New("User not found")
	ErrWrongPassword    = errors.New("email or password is incorrent")
)

Functions

This section is empty.

Types

type BoltStore

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

func NewBoltStore

func NewBoltStore(db *bolt.DB, userBucket string) (*BoltStore, error)

func (*BoltStore) Login

func (bs *BoltStore) Login(email, pass string) (string, error)

func (*BoltStore) Signin

func (bs *BoltStore) Signin(email, pass string) (string, error)

func (*BoltStore) UserByEmail

func (bs *BoltStore) UserByEmail(email string) (User, error)

type User

type User struct {
	Id       string
	Email    string
	Password string
	Salt     string
}

func NewUser

func NewUser(userId, email, pass string) (User, error)

type UserRepository

type UserRepository interface {
	Signin(email, pass string) (string, error)
	Login(email, pass string) (string, error)
	UserByEmail(email string) (User, error)
}

Jump to

Keyboard shortcuts

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