models

package
v0.0.0-...-5d707ef Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoRecord is custom error if database record is not found.
	ErrNoRecord = errors.New("models: no matching record found")

	// ErrInvalidCredentials is custom error if a user tries to login with an
	// incorrect email address or password.
	ErrInvalidCredentials = errors.New("models: invalid credentials")

	// ErrDuplicateEmail is custom error if a user tries to signup with an email
	// address that's already in use.
	ErrDuplicateEmail = errors.New("models: duplicate email")
)

Functions

This section is empty.

Types

type Snippet

type Snippet struct {
	ID      int
	Title   string
	Content string
	Created time.Time
	Expires time.Time
}

Snippet is ...

type User

type User struct {
	ID             int
	Name           string
	Email          string
	HashedPassword []byte
	Created        time.Time
}

User is ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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