Documentation ¶
Index ¶
- func AddArticle(data map[string]interface{}) bool
- func AddTag(name string, state int, createdBy string) bool
- func CheckAuth(username, password string) bool
- func CloseDB()
- func DeleteArticle(id int) bool
- func DeleteTag(id int) bool
- func EditArticle(id int, maps interface{}) bool
- func EditTag(id int, data interface{}) bool
- func ExistArticleByID(id int) bool
- func ExistTagByID(id int) bool
- func ExistTagByName(name string) bool
- func GetArticleTotal(maps interface{}) (count int)
- func GetRoles(username string) []string
- func GetTagTotal(maps interface{}) (count int)
- func GetUserID(username string) string
- type Article
- type Auth
- type Claims
- type Model
- type Tag
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddArticle ¶
func DeleteArticle ¶
func EditArticle ¶
func ExistArticleByID ¶
func ExistTagByID ¶
func ExistTagByName ¶
func GetArticleTotal ¶
func GetArticleTotal(maps interface{}) (count int)
func GetTagTotal ¶
func GetTagTotal(maps interface{}) (count int)
Types ¶
type Article ¶
type Article struct { Model State int `json:"state"` TagId int `json:"tag_id"` Title string `json:"title"` Desc string `json:"desc"` Content string `json:"Content"` CoverImageUrl string `json:"cover_image_url"` CreatedBy string `json:"created_by"` Tag Tag `json:"tag"` }
func GetArticle ¶
func GetArticles ¶
type Claims ¶
type Claims struct { ID int `gorm:"primary_key" json:"claim_id"` AuthID int `json:"auth_id"` Type string `json:"type"` Value string `json:"value"` }
func GetUserClaims ¶
Click to show internal directories.
Click to hide internal directories.