Documentation ¶
Index ¶
- func AddTag(tag model.Tag) (id int, err error)
- func AddUser(user model.User) (id int, err error)
- func CategoryDelete(category model.Category) (id int, err error)
- func CategorySave(category model.Category) (id int, err error)
- func GetCategories() (categories []model.Category, err error)
- func GetCategory(id int) (category model.Category)
- func GetCategoryIdsByName(name string) (categoryIds []string, err error)
- func GetDB() *sql.DB
- func GetPage(id string) (page model.Page)
- func GetPageByIdent(ident string) (page model.Page)
- func GetPages(params PageParams) (pages []model.Page, err error)
- func GetPost(id string) (post model.Post)
- func GetPostCountByTagId(id string) (int, error)
- func GetPostIdsByContent(content string) ([]string, error)
- func GetPosts(params PostParams) (posts []model.Post, err error)
- func GetTagIdsByName(name string) (tagIds []string, err error)
- func GetTags() (tags []model.Tag, err error)
- func GetUser(email string) (user model.User)
- func IncrTagCount(id string)
- func IncrView(id string)
- func Init(cfg *mysql.Config) *sql.DB
- func PageDelete(page model.Page) (id int, err error)
- func PageSave(page model.Page) (id int, err error)
- func PostDelete(post model.Post) (id int, err error)
- func PostSave(post model.Post) (id int, err error)
- type PageParams
- type PostParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCategories ¶
func GetCategory ¶
func GetCategoryIdsByName ¶
func GetPageByIdent ¶
func GetPostCountByTagId ¶
func GetPostIdsByContent ¶
func GetTagIdsByName ¶
func IncrTagCount ¶
func IncrTagCount(id string)
Types ¶
type PageParams ¶
Click to show internal directories.
Click to hide internal directories.