models

package
v0.0.0-...-96db308 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrNoRecord is returned with no matching records are found
	ErrNoRecord = errors.New("models: no matching record found")
	//ErrInvalidCredentials is returned when the user provides bad creds
	ErrInvalidCredentials = errors.New("models: invalid credentials")
	//ErrDuplicateEmail is returned whe na user tries to provide an email that's in use
	ErrDuplicateEmail = errors.New("models: duplicate email")
)

Functions

This section is empty.

Types

type Todo

type Todo struct {
	ID             int
	Title          string
	Content        string
	Created        time.Time
	CompletionDate time.Time
	Completed      bool
	UserID         int
}

Todo represents a todo object in the app

type User

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

User represents a user of the app

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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