Documentation
¶
Index ¶
- type DB
- func (m *DB) AuthenticateUser(email, password string) (int, error)
- func (d *DB) Close()
- func (d *DB) Connect(dsn string) error
- func (m *DB) GetArticle(id int) (*models.Article, error)
- func (m *DB) GetUser(id int) (*models.User, error)
- func (m *DB) InsertArticle(title, content, url string) (int, error)
- func (m *DB) InsertUser(name, email, password string) error
- func (m *DB) LatestArticles() ([]*models.Article, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) GetArticle ¶
Get gets a single article from the DB
func (*DB) InsertArticle ¶
Insert adds an article to the DB
func (*DB) InsertUser ¶
Click to show internal directories.
Click to hide internal directories.