Documentation ¶
Index ¶
- func InitController()
- type CategoryController
- type ChallengeController
- func (c *ChallengeController) Create(ctx *gin.Context)
- func (c *ChallengeController) CreateFlag(ctx *gin.Context)
- func (c *ChallengeController) Delete(ctx *gin.Context)
- func (c *ChallengeController) DeleteAttachment(ctx *gin.Context)
- func (c *ChallengeController) DeleteFlag(ctx *gin.Context)
- func (c *ChallengeController) Find(ctx *gin.Context)
- func (c *ChallengeController) SaveAttachment(ctx *gin.Context)
- func (c *ChallengeController) Update(ctx *gin.Context)
- func (c *ChallengeController) UpdateFlag(ctx *gin.Context)
- type ConfigController
- type Controller
- type GameController
- func (g *GameController) BroadCast(ctx *gin.Context)
- func (g *GameController) Create(ctx *gin.Context)
- func (g *GameController) CreateChallenge(ctx *gin.Context)
- func (g *GameController) CreateNotice(ctx *gin.Context)
- func (g *GameController) CreateTeam(ctx *gin.Context)
- func (g *GameController) Delete(ctx *gin.Context)
- func (g *GameController) DeleteChallenge(ctx *gin.Context)
- func (g *GameController) DeleteNotice(ctx *gin.Context)
- func (g *GameController) DeletePoster(ctx *gin.Context)
- func (g *GameController) DeleteTeam(ctx *gin.Context)
- func (g *GameController) Find(ctx *gin.Context)
- func (g *GameController) FindChallenge(ctx *gin.Context)
- func (g *GameController) FindNotice(ctx *gin.Context)
- func (g *GameController) FindTeam(ctx *gin.Context)
- func (g *GameController) SavePoster(ctx *gin.Context)
- func (g *GameController) Update(ctx *gin.Context)
- func (g *GameController) UpdateChallenge(ctx *gin.Context)
- func (g *GameController) UpdateNotice(ctx *gin.Context)
- func (g *GameController) UpdateTeam(ctx *gin.Context)
- type ICategoryController
- type IChallengeController
- type IConfigController
- type IGameController
- type IMediaController
- type IPodController
- type IProxyController
- type ISubmissionController
- type ITeamController
- type IUserController
- type MediaController
- type PodController
- type ProxyController
- type SubmissionController
- type TeamController
- func (c *TeamController) Create(ctx *gin.Context)
- func (c *TeamController) CreateUser(ctx *gin.Context)
- func (c *TeamController) Delete(ctx *gin.Context)
- func (c *TeamController) DeleteAvatar(ctx *gin.Context)
- func (c *TeamController) DeleteUser(ctx *gin.Context)
- func (c *TeamController) Find(ctx *gin.Context)
- func (c *TeamController) GetInviteToken(ctx *gin.Context)
- func (c *TeamController) Join(ctx *gin.Context)
- func (c *TeamController) Leave(ctx *gin.Context)
- func (c *TeamController) SaveAvatar(ctx *gin.Context)
- func (c *TeamController) Update(ctx *gin.Context)
- func (c *TeamController) UpdateInviteToken(ctx *gin.Context)
- type UserController
- func (c *UserController) Create(ctx *gin.Context)
- func (c *UserController) Delete(ctx *gin.Context)
- func (c *UserController) DeleteAvatar(ctx *gin.Context)
- func (c *UserController) Find(ctx *gin.Context)
- func (c *UserController) Login(ctx *gin.Context)
- func (c *UserController) Logout(ctx *gin.Context)
- func (c *UserController) Register(ctx *gin.Context)
- func (c *UserController) SaveAvatar(ctx *gin.Context)
- func (c *UserController) Update(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitController ¶
func InitController()
Types ¶
type CategoryController ¶
type CategoryController struct {
// contains filtered or unexported fields
}
func (*CategoryController) Create ¶
func (c *CategoryController) Create(ctx *gin.Context)
Create @Summary create new category @Description @Tags Category @Accept json @Produce json @Security ApiKeyAuth @Param req body request.CategoryCreateRequest true "CategoryCreateRequest" @Router /categories/ [post]
func (*CategoryController) Delete ¶
func (c *CategoryController) Delete(ctx *gin.Context)
Delete @Summary delete category @Description @Tags Category @Accept json @Produce json @Security ApiKeyAuth @Param req body request.CategoryDeleteRequest true "CategoryDeleteRequest" @Router /categories/{id} [delete]
func (*CategoryController) Find ¶
func (c *CategoryController) Find(ctx *gin.Context)
Find @Summary get category @Description @Tags Category @Accept json @Produce json @Security ApiKeyAuth @Param req query request.CategoryFindRequest true "CategoryFindRequest" @Router /categories/ [get]
func (*CategoryController) Update ¶
func (c *CategoryController) Update(ctx *gin.Context)
Update @Summary update category @Description @Tags Category @Accept json @Produce json @Security ApiKeyAuth @Param req body request.CategoryUpdateRequest true "CategoryUpdateRequest" @Router /categories/{id} [put]
type ChallengeController ¶
type ChallengeController struct {
// contains filtered or unexported fields
}
func (*ChallengeController) Create ¶
func (c *ChallengeController) Create(ctx *gin.Context)
Create @Summary 创建题目 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param 创建请求 body request.ChallengeCreateRequest true "ChallengeCreateRequest" @Router /challenges/ [post]
func (*ChallengeController) CreateFlag ¶
func (c *ChallengeController) CreateFlag(ctx *gin.Context)
CreateFlag @Summary 创建 flag @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Router /challenges/{id}/flags [post]
func (*ChallengeController) Delete ¶
func (c *ChallengeController) Delete(ctx *gin.Context)
Delete @Summary 删除题目 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param request body request.ChallengeDeleteRequest true "ChallengeDeleteRequest" @Router /challenges/{id} [delete]
func (*ChallengeController) DeleteAttachment ¶
func (c *ChallengeController) DeleteAttachment(ctx *gin.Context)
DeleteAttachment @Summary 删除附件 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Router /challenges/{id}/attachment [delete]
func (*ChallengeController) DeleteFlag ¶
func (c *ChallengeController) DeleteFlag(ctx *gin.Context)
DeleteFlag @Summary 删除 flag @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Router /challenges/{id}/flags/{flag_id} [delete]
func (*ChallengeController) Find ¶
func (c *ChallengeController) Find(ctx *gin.Context)
Find @Summary 题目查询 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param input query request.ChallengeFindRequest false "ChallengeFindRequest" @Router /challenges/ [get]
func (*ChallengeController) SaveAttachment ¶
func (c *ChallengeController) SaveAttachment(ctx *gin.Context)
SaveAttachment @Summary 保存附件 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param file formData file true "attachment" @Router /challenges/{id}/attachment [post]
func (*ChallengeController) Update ¶
func (c *ChallengeController) Update(ctx *gin.Context)
Update @Summary 更新题目 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param request body request.ChallengeUpdateRequest true "ChallengeUpdateRequest" @Router /challenges/{id} [put]
func (*ChallengeController) UpdateFlag ¶
func (c *ChallengeController) UpdateFlag(ctx *gin.Context)
UpdateFlag @Summary 更新 flag @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Router /challenges/{id}/flags/{flag_id} [put]
type ConfigController ¶
type ConfigController struct {
// contains filtered or unexported fields
}
func (*ConfigController) Find ¶
func (c *ConfigController) Find(ctx *gin.Context)
Find @Summary 配置全部查询 @Description 配置全部查询 @Tags Config @Accept json @Produce json @Router /configs/ [get]
func (*ConfigController) FindCaptcha ¶
func (c *ConfigController) FindCaptcha(ctx *gin.Context)
FindCaptcha @Summary Captcha 配置查询 @Description Captcha 配置查询 @Tags Config @Accept json @Produce json @Router /configs/captcha [get]
func (*ConfigController) Update ¶
func (c *ConfigController) Update(ctx *gin.Context)
Update @Summary 更新配置 @Description 更新配置 @Tags Config @Accept json @Produce json @Security ApiKeyAuth @Param input body request.ConfigUpdateRequest true "body" @Router /configs/ [put]
type Controller ¶
type Controller struct { UserController IUserController ChallengeController IChallengeController PodController IPodController ConfigController IConfigController MediaController IMediaController TeamController ITeamController SubmissionController ISubmissionController GameController IGameController CategoryController ICategoryController ProxyController IProxyController }
func C ¶
func C() *Controller
type GameController ¶
type GameController struct {
// contains filtered or unexported fields
}
func (*GameController) BroadCast ¶
func (g *GameController) BroadCast(ctx *gin.Context)
BroadCast @Summary 广播消息 @Description 广播消息 @Tags Game @Router /games/{id}/broadcast [get]
func (*GameController) Create ¶
func (g *GameController) Create(ctx *gin.Context)
Create @Summary 创建比赛 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param 创建请求 body request.GameCreateRequest true "GameCreateRequest" @Router /games/ [post]
func (*GameController) CreateChallenge ¶
func (g *GameController) CreateChallenge(ctx *gin.Context)
CreateChallenge @Summary 添加比赛的挑战 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/challenges [post]
func (*GameController) CreateNotice ¶
func (g *GameController) CreateNotice(ctx *gin.Context)
CreateNotice @Summary 添加比赛的通知 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/notices [post]
func (*GameController) CreateTeam ¶
func (g *GameController) CreateTeam(ctx *gin.Context)
CreateTeam @Summary 加入比赛 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param 加入请求 body request.GameTeamCreateRequest true "GameTeamCreateRequest" @Router /games/{id}/teams [post]
func (*GameController) Delete ¶
func (g *GameController) Delete(ctx *gin.Context)
Delete @Summary 删除比赛 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param 删除请求 body request.GameDeleteRequest true "GameDeleteRequest" @Router /games/{id} [delete]
func (*GameController) DeleteChallenge ¶
func (g *GameController) DeleteChallenge(ctx *gin.Context)
DeleteChallenge @Summary 删除比赛的挑战 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/challenges/{challenge_id} [delete]
func (*GameController) DeleteNotice ¶
func (g *GameController) DeleteNotice(ctx *gin.Context)
DeleteNotice @Summary 删除比赛的通知 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/notices/{notice_id} [delete]
func (*GameController) DeletePoster ¶
func (g *GameController) DeletePoster(ctx *gin.Context)
DeletePoster @Summary 删除海报 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/poster [delete]
func (*GameController) DeleteTeam ¶
func (g *GameController) DeleteTeam(ctx *gin.Context)
DeleteTeam @Summary 删除比赛的团队 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/teams/{team_id} [delete]
func (*GameController) Find ¶
func (g *GameController) Find(ctx *gin.Context)
Find @Summary 比赛查询 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param 查找请求 query request.GameFindRequest false "GameFindRequest" @Router /games/ [get]
func (*GameController) FindChallenge ¶
func (g *GameController) FindChallenge(ctx *gin.Context)
FindChallenge @Summary 查询比赛的挑战 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/challenges [get]
func (*GameController) FindNotice ¶
func (g *GameController) FindNotice(ctx *gin.Context)
FindNotice @Summary 查询比赛的通知 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/notices [get]
func (*GameController) FindTeam ¶
func (g *GameController) FindTeam(ctx *gin.Context)
FindTeam @Summary 查询比赛的团队 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/teams [get]
func (*GameController) SavePoster ¶
func (g *GameController) SavePoster(ctx *gin.Context)
SavePoster @Summary 保存头图 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param file formData file true "poster" @Router /games/{id}/poster [post]
func (*GameController) Update ¶
func (g *GameController) Update(ctx *gin.Context)
Update @Summary 更新比赛 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param 更新请求 body request.GameUpdateRequest true "GameUpdateRequest" @Router /games/{id} [put]
func (*GameController) UpdateChallenge ¶
func (g *GameController) UpdateChallenge(ctx *gin.Context)
UpdateChallenge @Summary 更新比赛的挑战 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/challenges/{challenge_id} [put]
func (*GameController) UpdateNotice ¶
func (g *GameController) UpdateNotice(ctx *gin.Context)
UpdateNotice @Summary 更新比赛的通知 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Router /games/{id}/notices/{notice_id} [put]
func (*GameController) UpdateTeam ¶
func (g *GameController) UpdateTeam(ctx *gin.Context)
UpdateTeam @Summary 允许加入比赛 @Description @Tags Game @Accept json @Produce json @Security ApiKeyAuth @Param 允许加入请求 body request.GameTeamUpdateRequest true "GameTeamUpdateRequest" @Router /games/{id}/teams/{team_id} [put]
type ICategoryController ¶
type ICategoryController interface { Create(ctx *gin.Context) Update(ctx *gin.Context) Find(ctx *gin.Context) Delete(ctx *gin.Context) }
func NewCategoryController ¶
func NewCategoryController(s *service.Service) ICategoryController
type IChallengeController ¶
type IChallengeController interface { Find(ctx *gin.Context) Create(ctx *gin.Context) Update(ctx *gin.Context) Delete(ctx *gin.Context) CreateFlag(ctx *gin.Context) UpdateFlag(ctx *gin.Context) DeleteFlag(ctx *gin.Context) SaveAttachment(ctx *gin.Context) DeleteAttachment(ctx *gin.Context) }
func NewChallengeController ¶
func NewChallengeController(s *service.Service) IChallengeController
type IConfigController ¶
type IConfigController interface { Find(ctx *gin.Context) Update(ctx *gin.Context) FindCaptcha(ctx *gin.Context) }
func NewConfigController ¶
func NewConfigController(s *service.Service) IConfigController
type IGameController ¶
type IGameController interface { Create(ctx *gin.Context) Find(ctx *gin.Context) Delete(ctx *gin.Context) Update(ctx *gin.Context) BroadCast(ctx *gin.Context) FindTeam(ctx *gin.Context) CreateTeam(ctx *gin.Context) UpdateTeam(ctx *gin.Context) DeleteTeam(ctx *gin.Context) FindChallenge(ctx *gin.Context) CreateChallenge(ctx *gin.Context) UpdateChallenge(ctx *gin.Context) DeleteChallenge(ctx *gin.Context) FindNotice(ctx *gin.Context) CreateNotice(ctx *gin.Context) UpdateNotice(ctx *gin.Context) DeleteNotice(ctx *gin.Context) SavePoster(ctx *gin.Context) DeletePoster(ctx *gin.Context) }
func NewGameController ¶
func NewGameController(s *service.Service) IGameController
type IMediaController ¶
func NewMediaController ¶
func NewMediaController(s *service.Service) IMediaController
type IPodController ¶
type IPodController interface { Create(ctx *gin.Context) Remove(ctx *gin.Context) Renew(ctx *gin.Context) Find(ctx *gin.Context) }
func NewPodController ¶
func NewPodController(s *service.Service) IPodController
type IProxyController ¶
func NewProxyController ¶
func NewProxyController() IProxyController
type ISubmissionController ¶
type ISubmissionController interface { Find(ctx *gin.Context) Create(ctx *gin.Context) Delete(ctx *gin.Context) }
func NewSubmissionController ¶
func NewSubmissionController(s *service.Service) ISubmissionController
type ITeamController ¶
type ITeamController interface { Create(ctx *gin.Context) Update(ctx *gin.Context) Delete(ctx *gin.Context) Find(ctx *gin.Context) CreateUser(ctx *gin.Context) DeleteUser(ctx *gin.Context) GetInviteToken(ctx *gin.Context) UpdateInviteToken(ctx *gin.Context) Join(ctx *gin.Context) Leave(ctx *gin.Context) SaveAvatar(ctx *gin.Context) DeleteAvatar(ctx *gin.Context) }
func NewTeamController ¶
func NewTeamController(s *service.Service) ITeamController
type IUserController ¶
type IUserController interface { Login(ctx *gin.Context) Logout(ctx *gin.Context) Register(ctx *gin.Context) Create(ctx *gin.Context) Update(ctx *gin.Context) Delete(ctx *gin.Context) Find(ctx *gin.Context) SaveAvatar(ctx *gin.Context) DeleteAvatar(ctx *gin.Context) }
func NewUserController ¶
func NewUserController(s *service.Service) IUserController
type MediaController ¶
type MediaController struct {
// contains filtered or unexported fields
}
func (*MediaController) GetFile ¶
func (m *MediaController) GetFile(ctx *gin.Context)
type PodController ¶
type PodController struct {
// contains filtered or unexported fields
}
func (*PodController) Create ¶
func (c *PodController) Create(ctx *gin.Context)
Create @Summary 创建实例 @Description 创建实例 @Tags Pod @Accept json @Produce json @Security ApiKeyAuth @Param input body request.PodCreateRequest true "PodCreateRequest" @Router /pods/ [post]
func (*PodController) Find ¶
func (c *PodController) Find(ctx *gin.Context)
Find @Summary 实例查询 @Description 实例查询 @Tags Pod @Produce json @Security ApiKeyAuth @Param input query request.PodFindRequest false "PodFindRequest" @Router /pods/ [get]
func (*PodController) Remove ¶
func (c *PodController) Remove(ctx *gin.Context)
Remove @Summary 停止并删除容器 @Description 停止并删除容器 @Tags Pod @Produce json @Security ApiKeyAuth @Param input body request.PodRemoveRequest true "PodRemoveRequest" @Router /pods/{id} [delete]
func (*PodController) Renew ¶
func (c *PodController) Renew(ctx *gin.Context)
Renew @Summary 容器续期 @Description 容器续期 @Tags Pod @Produce json @Security ApiKeyAuth @Param input body request.PodRenewRequest true "PodRenewRequest" @Router /pods/{id} [put]
type ProxyController ¶
type ProxyController struct { }
func (*ProxyController) Connect ¶
func (p *ProxyController) Connect(ctx *gin.Context)
Connect TCP over WebSocket in Cloudsdale requires a complete Websocket header to establish a connection.
type SubmissionController ¶
type SubmissionController struct {
// contains filtered or unexported fields
}
func (*SubmissionController) Create ¶
func (c *SubmissionController) Create(ctx *gin.Context)
Create @Summary 提交 @Description @Tags Submission @Accept json @Produce json @Security ApiKeyAuth @Param 创建请求 body request.SubmissionCreateRequest true "SubmissionCreateRequest" @Router /submissions/ [post]
func (*SubmissionController) Delete ¶
func (c *SubmissionController) Delete(ctx *gin.Context)
Delete @Summary delete submission @Description @Tags Submission @Accept json @Produce json @Security ApiKeyAuth @Param 删除请求 body request.SubmissionDeleteRequest true "SubmissionDeleteRequest" @Router /submissions/{id} [delete]
func (*SubmissionController) Find ¶
func (c *SubmissionController) Find(ctx *gin.Context)
Find @Summary 提交记录查询 @Description @Tags Submission @Accept json @Produce json @Security ApiKeyAuth @Param 查找请求 query request.SubmissionFindRequest false "SubmissionFindRequest" @Router /submissions/ [get]
type TeamController ¶
type TeamController struct {
// contains filtered or unexported fields
}
func (*TeamController) Create ¶
func (c *TeamController) Create(ctx *gin.Context)
Create @Summary 创建团队 @Description 创建团队 @Tags Team @Accept json @Produce json @Param input body request.TeamCreateRequest true "TeamCreateRequest" @Router /teams/ [post]
func (*TeamController) CreateUser ¶
func (c *TeamController) CreateUser(ctx *gin.Context)
CreateUser @Summary 加入团队 @Description 加入团队 @Tags Team @Accept json @Produce json @Param input body request.TeamUserCreateRequest true "TeamUserCreateRequest" @Router /teams/{id}/users/ [post]
func (*TeamController) Delete ¶
func (c *TeamController) Delete(ctx *gin.Context)
Delete @Summary 删除团队 @Description 删除团队 @Tags Team @Accept json @Produce json @Param input body request.TeamDeleteRequest true "TeamDeleteRequest" @Router /teams/{id} [delete]
func (*TeamController) DeleteAvatar ¶
func (c *TeamController) DeleteAvatar(ctx *gin.Context)
DeleteAvatar @Summary 删除头像 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Router /teams/{id}/avatar [delete]
func (*TeamController) DeleteUser ¶
func (c *TeamController) DeleteUser(ctx *gin.Context)
DeleteUser @Summary 踢出团队 @Description 踢出团队 @Tags Team @Accept json @Produce json @Param input body request.TeamUserDeleteRequest true "TeamUserDeleteRequest" @Router /teams/{id}/users/{user_id} [delete]
func (*TeamController) Find ¶
func (c *TeamController) Find(ctx *gin.Context)
Find @Summary 查找团队 @Description 查找团队 @Tags Team @Accept json @Produce json @Param input query request.TeamFindRequest false "TeamFindRequest" @Router /teams/ [get]
func (*TeamController) GetInviteToken ¶
func (c *TeamController) GetInviteToken(ctx *gin.Context)
GetInviteToken @Summary 获取邀请码 @Description 获取邀请码 @Tags Team @Accept json @Produce json @Param id path string true "id" @Router /teams/{id}/invite [get]
func (*TeamController) Join ¶
func (c *TeamController) Join(ctx *gin.Context)
Join @Summary 加入团队 @Description 加入团队 @Tags Team @Accept json @Produce json @Param id path string true "id" @Router /teams/{id}/join [post]
func (*TeamController) Leave ¶
func (c *TeamController) Leave(ctx *gin.Context)
Leave @Summary 离开团队 @Description 离开团队 @Tags Team @Accept json @Produce json @Param id path string true "id" @Router /teams/{id}/leave [delete]
func (*TeamController) SaveAvatar ¶
func (c *TeamController) SaveAvatar(ctx *gin.Context)
SaveAvatar @Summary 保存头像 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param file formData file true "avatar" @Router /teams/{id}/avatar [post]
func (*TeamController) Update ¶
func (c *TeamController) Update(ctx *gin.Context)
Update @Summary 更新团队 @Description 更新团队 @Tags Team @Accept json @Produce json @Param input body request.TeamUpdateRequest true "TeamUpdateRequest" @Router /teams/{id} [put]
func (*TeamController) UpdateInviteToken ¶
func (c *TeamController) UpdateInviteToken(ctx *gin.Context)
UpdateInviteToken @Summary 更新邀请码 @Description 更新邀请码 @Tags Team @Accept json @Produce json @Param id path string true "id" @Router /teams/{id}/invite [put]
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func (*UserController) Create ¶
func (c *UserController) Create(ctx *gin.Context)
Create @Summary 用户创建 @Description @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param 创建请求 body request.UserCreateRequest true "UserCreateRequest" @Router /users/ [post]
func (*UserController) Delete ¶
func (c *UserController) Delete(ctx *gin.Context)
Delete @Summary 用户删除 @Description @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param input body request.UserDeleteRequest true "UserDeleteRequest" @Router /users/{id} [delete]
func (*UserController) DeleteAvatar ¶
func (c *UserController) DeleteAvatar(ctx *gin.Context)
DeleteAvatar @Summary 删除头像 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Router /users/{id}/avatar [delete]
func (*UserController) Find ¶
func (c *UserController) Find(ctx *gin.Context)
Find @Summary 用户查询 @Description @Tags User @Accept json @Produce json @Param input query request.UserFindRequest false "UserFindRequest" @Router /users/ [get]
func (*UserController) Login ¶
func (c *UserController) Login(ctx *gin.Context)
Login @Summary 用户登录 @Description @Tags User @Accept json @Produce json @Param 登录请求 body request.UserLoginRequest true "UserLoginRequest" @Router /users/login [post]
func (*UserController) Logout ¶
func (c *UserController) Logout(ctx *gin.Context)
Logout @Summary 用户登出 @Description @Tags User @Accept json @Produce json @Security ApiKeyAuth @Router /users/logout [post]
func (*UserController) Register ¶
func (c *UserController) Register(ctx *gin.Context)
Register @Summary 用户注册 @Description @Tags User @Accept json @Produce json @Param input body request.UserRegisterRequest true "UserRegisterRequest" @Router /users/register [post]
func (*UserController) SaveAvatar ¶
func (c *UserController) SaveAvatar(ctx *gin.Context)
SaveAvatar @Summary 保存头像 @Description @Tags Challenge @Accept json @Produce json @Security ApiKeyAuth @Param file formData file true "avatar" @Router /users/{id}/avatar [post]
func (*UserController) Update ¶
func (c *UserController) Update(ctx *gin.Context)
Update @Summary 用户更新 @Description @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param 更新请求 body request.UserUpdateRequest true "UserUpdateRequest" @Router /users/{id} [put]