domain

package
v0.0.0-...-41e512e Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEMail    = errors.New("invalid email")
	ErrInvalidPassword = errors.New("invalid password")
	ErrHashError       = errors.New("failed to hash password")
)

Functions

This section is empty.

Types

type User

type User struct {
	ID    primitive.ObjectID `json:"_id" bson:"_id"`
	EMail string             `json:"email" bson:"email"`
	Hash  []byte             `json:"hash" bson:"hash"`
	Admin bool               `json:"admin" bson:"admin"`
}

func NewAdmin

func NewAdmin(email, password string) (*User, error)

func NewUser

func NewUser(email, password string) (*User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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