Documentation
¶
Index ¶
- Variables
- func AddLoginCookie(c *gin.Context)
- func CreateTable()
- func DeleteArticle(Id string) error
- func FetchArticlesCount(c Condition, Enabled bool) (int, error)
- func FetchClassifies(Enabled bool) (map[string]int, error)
- func FetchTags(classify string, Enabled bool) (map[string]int, error)
- func InitArticle(r *gin.Engine)
- func InitAuth(r *gin.Engine)
- func InitUtils(r *gin.Engine)
- func InsertArticle(A *Article) error
- func RemoveLoginCookie(c *gin.Context)
- func Return(c *gin.Context, status bool, data interface{}, message string)
- func ReturnFalse(c *gin.Context, message string)
- func ReturnTrue(c *gin.Context, data interface{})
- func UpdateArticle(A Article) error
- func ValidateLogin(j tools.Account) bool
- func ValidateLoginStatus(c *gin.Context) bool
- type Article
- type Condition
Constants ¶
This section is empty.
Variables ¶
View Source
var FORBIDDEN = "没有访问权限"
View Source
var JSON_ERROR = "JSON 解析失败"
Functions ¶
func AddLoginCookie ¶
func CreateTable ¶
func CreateTable()
func DeleteArticle ¶
func InitArticle ¶
func InsertArticle ¶
func RemoveLoginCookie ¶
func ReturnFalse ¶
func ReturnTrue ¶
func UpdateArticle ¶
func ValidateLogin ¶
func ValidateLoginStatus ¶
Types ¶
type Article ¶
type Article struct { Id int64 `json:"id"` Classify string `json:"classify"` Tag string `json:"tag"` Enabled bool `json:"enabled"` Logo string `json:"logo"` Description string `json:"description"` Title string `json:"title"` Raw string `json:"raw"` CreateAt string `json:"createAt"` UpdateAt string `json:"updateAt"` }
func FetchLogos ¶
Click to show internal directories.
Click to hide internal directories.