Documentation ¶
Index ¶
- func AddArticle(data map[string]interface{}) error
- func AddTag(name string, state int, createdBy string) error
- func CheckAuth(username, password string) bool
- func CleanAllArticle() error
- func CleanAllTag() (bool, error)
- func CloseDB()
- func DeleteArticle(id int) error
- func DeleteTag(id int) (bool, error)
- func EditArticle(id int, data interface{}) error
- func EditTag(id int, data interface{}) (bool, error)
- func ExistArticleByID(id int) bool
- func ExistTagByID(id int) bool
- func ExistTagByName(name string) bool
- func GetArticleTotal(maps interface{}) (count int)
- func GetTagTotal(maps interface{}) (int, error)
- func Setup()
- type Article
- type Auth
- type Model
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Article ¶
type Article struct { Model TagID int `json:"tag_id" gorm:"index"` Tag Tag `json:"tag"` Title string `json:"title"` Desc string `json:"desc"` Content string `json:"content"` CreatedBy string `json:"created_by"` ModifiedBy string `json:"modified_by"` State int `json:"state"` CoverImageUrl string `json:"cover_image_url"` }
Click to show internal directories.
Click to hide internal directories.