Documentation ¶
Index ¶
- func AdminIndexAction(c *gin.Context)
- func CheckAdmin(authToken string) bool
- func CreateAction(c *gin.Context)
- func IndexAction(c *gin.Context)
- func LoginAction(c *gin.Context)
- func LoginAdminAction(c *gin.Context)
- func Routes(r *gin.RouterGroup)
- func ToggleFollowAction(c *gin.Context)
- type CreateParams
- type LoginAdminParams
- type LoginParams
- type ToggleFollowParams
- type User
- func CreateUser(nickname, username string, role UserRole, password string) (*User, error)
- func CurrentAdmin(authToken string) *User
- func CurrentUser(authToken string) *User
- func LoginAdmin(username string, password string) (*User, error)
- func LoginUser(username string, password string) (*User, error)
- type UserResp
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminIndexAction ¶
func CheckAdmin ¶
func CreateAction ¶
func IndexAction ¶
func LoginAction ¶
func LoginAdminAction ¶
func Routes ¶
func Routes(r *gin.RouterGroup)
func ToggleFollowAction ¶
Types ¶
type CreateParams ¶
type LoginAdminParams ¶
type LoginParams ¶
type ToggleFollowParams ¶
type ToggleFollowParams struct {
UserId int64 `form:"id"`
}
type User ¶
type User struct { Id int64 Nickname string Username string Phone string Email string Avatar string Role UserRole ApiToken string EncryptedPassword string CreatedAt time.Time UpdatedAt time.Time }
func CreateUser ¶
func CurrentAdmin ¶
func CurrentUser ¶
Click to show internal directories.
Click to hide internal directories.