Documentation
¶
Index ¶
- func CreateArticle(article Article) bool
- func CreateTag(tag Tag) bool
- func DeleteArticle(id int64) bool
- func DeleteTags(id int64) bool
- func ExistArticle(id int64) bool
- func ExistTag(id int64) bool
- func ExistUser(username string, password string) bool
- func GetArticleCount(maps map[string]interface{}) (count int64)
- func GetTagCount(maps map[string]interface{}) (count int64)
- func UpdateArticle(id int64, article Article) bool
- func UpdateTag(id int64, tag Tag) bool
- type Article
- type Auth
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateArticle ¶
func DeleteArticle ¶
func DeleteTags ¶
func ExistArticle ¶
func GetArticleCount ¶
func GetTagCount ¶
func UpdateArticle ¶
Types ¶
type Article ¶
type Article struct { ID int64 `json:"id"` //gorm 约定主键 Title string `json:"title"` Content string `json:"content"` TagId int64 `json:"tag_id" gorm:"index"` Tag Tag `json:"tag"` Desc string `json:"desc"` CreatedAt int `json:"created_at"` //gorm 约定创建时间字段 CreateBy string `json:"create_by"` UpdatedAt int `json:"updated_at"` //gorm 约定更新时间字段 ModifyBy string `json:"modify_by"` DeleteOn int `json:"delete_on"` State int `json:"state"` }
Click to show internal directories.
Click to hide internal directories.