Documentation ¶
Index ¶
- Variables
- type Snippet
- type SnippetModel
- type SnippetModelInterface
- type User
- type UserModel
- func (m *UserModel) Authenticate(email, password string) (int, error)
- func (m *UserModel) Exists(id int) (bool, error)
- func (m *UserModel) Get(id int) (*User, error)
- func (m *UserModel) Insert(name, email, password string) error
- func (m *UserModel) PasswordUpdate(id int, currentPassword, newPassword string) error
- type UserModelInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateEmail = errors.New("models: duplicate email")
View Source
var ErrInvalidCredentials = errors.New("models: invalid credentials")
View Source
var ErrNoRecord = errors.New("models: not matching record found")
Functions ¶
This section is empty.
Types ¶
type SnippetModel ¶
func (*SnippetModel) Latest ¶
func (m *SnippetModel) Latest() ([]*Snippet, error)
type SnippetModelInterface ¶
type UserModel ¶
func (*UserModel) Authenticate ¶
Click to show internal directories.
Click to hide internal directories.