Documentation
¶
Index ¶
- type Database
- type SqlDatabase
- func (db SqlDatabase) AddPost(title string, excerpt string, content string) (int, error)
- func (db SqlDatabase) ChangePost(id int, title string, excerpt string, content string) error
- func (db SqlDatabase) DeletePost(id int) (int, error)
- func (db SqlDatabase) GetPost(post_id int) (post common.Post, err error)
- func (db SqlDatabase) GetPosts(limit int, offset int) (all_posts []common.Post, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SqlDatabase ¶
func MakeSqlConnection ¶
func (SqlDatabase) ChangePost ¶
/ This function changes a post based on the values / provided. Note that empty strings will mean that / the value will not be updated.
func (SqlDatabase) DeletePost ¶
func (db SqlDatabase) DeletePost(id int) (int, error)
/ This function changes a post based on the values / provided. Note that empty strings will mean that / the value will not be updated.
Click to show internal directories.
Click to hide internal directories.