Versions in this module Expand all Collapse all v0 v0.1.0 Sep 27, 2020 Changes in this version + func AddArticle(data map[string]interface{}) error + func AddTag(name string, state int, createdBy string) error + func CheckAuth(username, password string) (bool, error) + func CleanAllArticle() error + func CleanAllTag() (bool, error) + func CloseDB() + func DeleteArticle(id int) error + func DeleteTag(id int) error + func EditArticle(id int, data interface{}) error + func EditTag(id int, data interface{}) error + func ExistArticleByID(id int) (bool, error) + func ExistTagByID(id int) (bool, error) + func ExistTagByName(name string) (bool, error) + func GetArticleTotal(maps interface{}) (int, error) + func GetTagTotal(maps interface{}) (int, error) + func Setup() + type Article struct + Content string + CoverImageUrl string + CreatedBy string + Desc string + ModifiedBy string + State int + Tag Tag + TagID int + Title string + func GetArticle(id int) (*Article, error) + func GetArticles(pageNum int, pageSize int, maps interface{}) ([]*Article, error) + type Auth struct + ID int + Password string + Username string + type Model struct + CreatedOn int + DeletedOn int + ID int + ModifiedOn int + type Tag struct + CreatedBy string + ModifiedBy string + Name string + State int + func GetTags(pageNum int, pageSize int, maps interface{}) ([]Tag, error)