Documentation ¶
Index ¶
- func CheckCate(username string) (code int)
- func CheckUser(username string) (code int)
- func CreateCate(data *Category) int
- func CreateUser(data *User) int
- func DeleteCate(id int) int
- func DeleteUser(id int) int
- func EditCate(id int, data *Category) int
- func EditUser(id int, data User) int
- func InitDb()
- func ScryptPw(password string) string
- type Article
- type Category
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Article ¶
type Article struct { Category Category `gorm:"foreignkey:Cid"` gorm.Model Title string `gorm:"type:varchar(100);not null" json:"title"` Cid int `gorm:"type:int;not null" json:"cid"` Desc string `gorm:"type:varchar(200)" json:"desc"` Content string `gorm:"type:longtext" json:"content"` Img string `gorm:"type:varchar(100)" json:"img"` }
type Category ¶
Click to show internal directories.
Click to hide internal directories.