Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SnippetModel ¶
Define a SnippetModel type which wraps a sql.DB connection pool.
func (*SnippetModel) Get ¶
func (m *SnippetModel) Get(id int) (*models.Snippet, error)
This will return a specific snippet based on its id.
type UserModel ¶
func (*UserModel) Authenticate ¶
We'll use the 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.