Documentation
¶
Index ¶
- type DatabaseMock
- func (db DatabaseMock) AddPage(title string, content string, link string) (int, error)
- func (db DatabaseMock) AddPost(title string, excerpt string, content string) (int, error)
- func (db DatabaseMock) ChangePost(id int, title string, excerpt string, content string) error
- func (db DatabaseMock) DeletePost(id int) (int, error)
- func (db DatabaseMock) GetPage(link string) (common.Page, error)
- func (db DatabaseMock) GetPost(post_id int) (common.Post, error)
- func (db DatabaseMock) GetPosts(limit int, offset int) ([]common.Post, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseMock ¶
type DatabaseMock struct { GetPostHandler func(int) (common.Post, error) GetPostsHandler func(int, int) ([]common.Post, error) AddPostHandler func(string, string, string) (int, error) DeletePostHandler func(int) (int, error) AddPageHandler func(string, string, string) (int, error) GetPageHandler func(string) (common.Page, error) }
func (DatabaseMock) ChangePost ¶
func (DatabaseMock) DeletePost ¶
func (db DatabaseMock) DeletePost(id int) (int, error)
Click to show internal directories.
Click to hide internal directories.