Documentation ¶
Index ¶
- Variables
- func AddArticle(data map[string]interface{}) error
- func AddTag(name string, state int, createdBy string) bool
- func CheckAuth(email, password string) (bool, string)
- func CleanAllArticle() bool
- func CleanAllTag() (bool, error)
- func CloseDB()
- func DeleteArticle(id int) bool
- func DeleteTag(id int) bool
- func EditArticle(id int, data interface{}) bool
- func EditTag(id int, data interface{}) bool
- func ExistArticleById(id int) (bool, error)
- func ExistTagByID(id int) bool
- func ExistTagByName(name string) bool
- func GetArticleTotal(maps interface{}) (count int)
- func GetTagTotal(maps interface{}) (count int)
- func GetUsers(page, pageSize int)
- func Setup()
- type Article
- type Auth
- type Model
- type Tag
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Users []User
Functions ¶
func AddArticle ¶
func CleanAllArticle ¶
func CleanAllArticle() bool
func CleanAllTag ¶
func DeleteArticle ¶
func EditArticle ¶
func ExistArticleById ¶
func ExistTagByID ¶
func GetArticleTotal ¶
func GetArticleTotal(maps interface{}) (count int)
func GetTagTotal ¶
func GetTagTotal(maps interface{}) (count int)
Types ¶
type Article ¶
type Article struct { Model TagID int `json:"tag_id" gorm:"index"` Tag Tag `json:"tag"` CategoryId int `json:"category_id"` Title string `json:"title"` Desc string `json:"desc"` Content string `json:"content"` State int `json:"state"` CoverImageUrl string `json:"cover_image_url"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
func GetArticle ¶
func GetArticles ¶
type Tag ¶
Click to show internal directories.
Click to hide internal directories.