Documentation ¶
Index ¶
- func LoadUser() gin.HandlerFunc
- func RegisterRouter(g *gin.RouterGroup)
- type Handler
- func (*Handler) EmailModify() gin.HandlerFunc
- func (*Handler) List() gin.HandlerFunc
- func (*Handler) PasswordModify() gin.HandlerFunc
- func (*Handler) ProfileModify() gin.HandlerFunc
- func (*Handler) Register() gin.HandlerFunc
- func (*Handler) Show() gin.HandlerFunc
- func (*Handler) SingleDelete() gin.HandlerFunc
- func (*Handler) TeamApplicationList() gin.HandlerFunc
- func (*Handler) TeamInvitationList() gin.HandlerFunc
- func (*Handler) TeamList() gin.HandlerFunc
- type RTeam
- type RTeamInvitationAndApplication
- func BindApplication(app *cpt.TeamApplication) *RTeamInvitationAndApplication
- func BindInvitation(inv *cpt.TeamInvitation) *RTeamInvitationAndApplication
- func BindTeamApplicationList(applications []cpt.TeamApplication) []*RTeamInvitationAndApplication
- func BindTeamInvitationList(invitations []cpt.TeamInvitation) []*RTeamInvitationAndApplication
- type RUser
- type RUserProfile
- type ReqEmailModify
- type ReqPasswordModify
- type ReqPermissionAdd
- type ReqProfileModify
- type ReqRegister
- type RespEmailHashShow
- type RespList
- type RespRegister
- type RespShow
- type RespTeamApplicationList
- type RespTeamInvitationList
- type RespTeamList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadUser ¶
func LoadUser() gin.HandlerFunc
func RegisterRouter ¶
func RegisterRouter(g *gin.RouterGroup)
Types ¶
type Handler ¶
type Handler struct { }
func (*Handler) EmailModify ¶
func (*Handler) EmailModify() gin.HandlerFunc
func (*Handler) List ¶
func (*Handler) List() gin.HandlerFunc
list godoc @Summary Show user list @Produce json @Param order_by query string false "OrderBy" @Param page query int false "Page" @Success 200 {object} response.List @Failure 400 {object} response.List @Failure 500 {object} response.List @Router /v1/user/ [GET]
func (*Handler) PasswordModify ¶
func (*Handler) PasswordModify() gin.HandlerFunc
func (*Handler) ProfileModify ¶
func (*Handler) ProfileModify() gin.HandlerFunc
func (*Handler) Register ¶
func (*Handler) Register() gin.HandlerFunc
register godoc @Summary Register a account @Produce json @Param register body request.Register true "Register" @Success 200 {object} response.Register @Failure 400 {object} response.Register @Failure 500 {object} response.Register @Router /v1/user/ [POST]
func (*Handler) Show ¶
func (*Handler) Show() gin.HandlerFunc
func (*Handler) SingleDelete ¶
func (*Handler) SingleDelete() gin.HandlerFunc
func (*Handler) TeamApplicationList ¶
func (*Handler) TeamApplicationList() gin.HandlerFunc
func (*Handler) TeamInvitationList ¶
func (*Handler) TeamInvitationList() gin.HandlerFunc
func (*Handler) TeamList ¶
func (*Handler) TeamList() gin.HandlerFunc
type RTeam ¶
type RTeamInvitationAndApplication ¶
type RTeamInvitationAndApplication struct { TeamID uint `json:"team_id"` Time time.Time `json:"time"` Status uint `json:"status"` }
func BindApplication ¶
func BindApplication(app *cpt.TeamApplication) *RTeamInvitationAndApplication
func BindInvitation ¶
func BindInvitation(inv *cpt.TeamInvitation) *RTeamInvitationAndApplication
func BindTeamApplicationList ¶
func BindTeamApplicationList(applications []cpt.TeamApplication) []*RTeamInvitationAndApplication
func BindTeamInvitationList ¶
func BindTeamInvitationList(invitations []cpt.TeamInvitation) []*RTeamInvitationAndApplication
type RUser ¶
type RUserProfile ¶
type ReqEmailModify ¶
type ReqEmailModify struct {
Email string `json:"email" validate:"email" binding:"email"`
}
type ReqPasswordModify ¶
type ReqPermissionAdd ¶
type ReqPermissionAdd struct {
Permissions []string `json:"permissions"`
}
type ReqProfileModify ¶
type ReqProfileModify struct { Nickname *string `json:"nickname" validate:"omitempty,max=50,min=1" binding:"omitempty,max=50,min=1"` Page *string `json:"page" validate:"omitempty,url" validate:"omitempty,url"` Description *string `json:"description"` }
func (*ReqProfileModify) Bind ¶
func (r *ReqProfileModify) Bind(p *cpt.UserProfile)
type ReqRegister ¶
type ReqRegister struct { Username string `json:"username" validate:"max=20,min=1,keyword" binding:"max=20,min=1,keyword"` Password string `json:"password" validate:"max=50,min=6" binding:"max=50,min=6"` Email string `json:"email" validate:"email" binding:"email"` EmailCaptcha string `json:"email_captcha,omitempty"` }
type RespEmailHashShow ¶
type RespEmailHashShow struct { Response EmailHash string `json:"email_hash"` }
type RespRegister ¶
type RespRegister struct { Response UserID uint `json:"user_id,omitempty"` }
type RespTeamApplicationList ¶
type RespTeamApplicationList struct { Response Applications []*RTeamInvitationAndApplication `json:"applications"` }
type RespTeamInvitationList ¶
type RespTeamInvitationList struct { Response Invitations []*RTeamInvitationAndApplication `json:"invitations"` }
type RespTeamList ¶
type RespTeamList struct { Response Teams []*RTeam `json:"teams"` }
Click to show internal directories.
Click to hide internal directories.