Documentation ¶
Index ¶
- type TodoModel
- func (m *TodoModel) Delete(id int) error
- func (m *TodoModel) Get(id int) (*models.Todo, error)
- func (m *TodoModel) Insert(title, content string, userID int) (int, error)
- func (m *TodoModel) Latest(userID int) ([]*models.Todo, error)
- func (m *TodoModel) Update(id int, title, content string, completed bool) error
- type UserModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TodoModel ¶
TodoModel type which wraps a sql.DB connection pool.
type UserModel ¶
UserModel is used to interact with our datastore
func (*UserModel) Authenticate ¶
Authenticate method to verify whether a user exists with the provided email address and password. This will return the relevant user ID if they do.
Click to show internal directories.
Click to hide internal directories.