Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRecord = errors.New("models: no matching record found")
Functions ¶
This section is empty.
Types ¶
type SnippetModel ¶
SnippetModel wraps a sql.DB connection pool.
func (*SnippetModel) Get ¶
func (m *SnippetModel) Get(id int) (Snippet, error)
Get will return a specific snippet based on its id.
func (*SnippetModel) Latest ¶
func (m *SnippetModel) Latest() ([]Snippet, error)
Latest will return the 10 most recently created snippets.
Click to show internal directories.
Click to hide internal directories.