user

package
v0.0.0-...-c035c89 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("user not found")

ErrNotFound is returned when a user could not be found.

Functions

This section is empty.

Types

type User

type User struct {
	ID        ulid.ULID `json:"id"`
	Version   int       `json:"version"`
	Email     string    `json:"email"`
	Password  string    `json:"-"`
	Timezone  string    `json:"timezone"`
	Active    bool      `json:"active"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	LoginAt   time.Time `json:"login_at"`
}

func New

func New() User

New creates a new user.

func (User) Validate

func (u User) Validate() validation.Errors

Validate validates the user.

Jump to

Keyboard shortcuts

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