Documentation ¶
Index ¶
- type Model
- func (m Model) AddQuote(q Quote) (err error)
- func (m Model) Close() error
- func (m Model) CountAllQuotes() (count int, err error)
- func (m Model) CountQuotes(q Query) (count int, err error)
- func (m Model) DeleteQuote(id int) (err error)
- func (m Model) GetPopularTags(n int) (tags []string, err error)
- func (m Model) GetQuote(id int) (quote Quote, err error)
- func (m Model) GetQuotes(q Query) (quotes []Quote, err error)
- func (m Model) VoteQuote(id int, vote int) (err error)
- type Query
- type Quote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func NewModel ¶
NewModel creates a new model with a DB connection to the give dbPath (currently sqlite)
func (Model) CountAllQuotes ¶
func (Model) DeleteQuote ¶
func (Model) GetPopularTags ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.