Documentation ¶
Index ¶
- func AddArticle(data map[string]interface{}) error
- func AddTag(name, createdBy string, state int) error
- func Close()
- func DeleteArticle(id int) error
- func DeleteArticles() error
- func DeleteTag(id int) error
- func DeleteTags() (bool, error)
- func EditArticle(id int, data map[string]interface{}) error
- func EditTag(id int, data map[string]interface{}) error
- func GetArticlesCount(cond map[string]interface{}) (int, error)
- func GetTagsCount(cond map[string]interface{}) (int, error)
- func HasArticleByID(id int) (bool, error)
- func HasTagByID(id int) (bool, error)
- func HasTagByName(name string) (bool, error)
- func Init()
- type Article
- type Model
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddArticle ¶
func DeleteArticle ¶
func DeleteArticles ¶
func DeleteArticles() error
func DeleteTags ¶
func EditArticle ¶
func GetArticlesCount ¶
func GetTagsCount ¶
func HasArticleByID ¶
func HasTagByID ¶
func HasTagByName ¶
Types ¶
type Article ¶
type Article struct { Model TagID int `gorm:"index" json:"tag_id"` Tag Tag `json:"tag"` Title string `json:"title"` Desc string `json:"desc"` Content string `json:"content"` }
func GetArticle ¶
Click to show internal directories.
Click to hide internal directories.