Versions in this module Expand all Collapse all v1 v1.2.1 Oct 25, 2023 Changes in this version + 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 struct + Page int + PerPage int + type PostParams struct + CategoryId string + Ids map[string][]string + Keyword string + Page int + PerPage int + TagId string