Documentation
¶
Index ¶
- func LoadContest() gin.HandlerFunc
- func LoadNotification() gin.HandlerFunc
- func RegisterRouter(g *gin.RouterGroup)
- type Handler
- func (*Handler) AdminAdd() gin.HandlerFunc
- func (*Handler) AdminDelete() gin.HandlerFunc
- func (*Handler) AdminList() gin.HandlerFunc
- func (*Handler) Create() gin.HandlerFunc
- func (*Handler) List() gin.HandlerFunc
- func (*Handler) Modify() gin.HandlerFunc
- func (*Handler) NotificationCreate() gin.HandlerFunc
- func (*Handler) NotificationList() gin.HandlerFunc
- func (*Handler) NotificationSingleDelete() gin.HandlerFunc
- func (*Handler) Show() gin.HandlerFunc
- func (*Handler) SingleDelete() gin.HandlerFunc
- func (*Handler) StatisticShow() gin.HandlerFunc
- func (*Handler) TeamAdd() gin.HandlerFunc
- func (*Handler) TeamCurrentLeave() gin.HandlerFunc
- func (*Handler) TeamCurrentShow() gin.HandlerFunc
- func (*Handler) TeamDelete() gin.HandlerFunc
- func (*Handler) TeamList() gin.HandlerFunc
- type RNotification
- type RStatisticSubmission
- type RStatisticTeam
- type RTeam
- type RTeamSubmission
- type ReqCreate
- type ReqModify
- type ReqNotificationCreate
- type ReqTeamAdd
- type ReqTeamDelete
- type RespContest
- type RespCreate
- type RespList
- type RespNotificationCreate
- type RespNotificationList
- type RespShow
- type RespStatisticShow
- type RespTeamCurrentShow
- type RespTeamDelete
- type RespTeamDeleteDetail
- type RespTeamList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadContest ¶
func LoadContest() gin.HandlerFunc
func LoadNotification ¶
func LoadNotification() gin.HandlerFunc
func RegisterRouter ¶
func RegisterRouter(g *gin.RouterGroup)
Types ¶
type Handler ¶
type Handler struct {
}
func (*Handler) AdminAdd ¶
func (*Handler) AdminAdd() gin.HandlerFunc
func (*Handler) AdminDelete ¶
func (*Handler) AdminDelete() gin.HandlerFunc
func (*Handler) AdminList ¶
func (*Handler) AdminList() gin.HandlerFunc
func (*Handler) Create ¶
func (*Handler) Create() gin.HandlerFunc
func (*Handler) List ¶
func (*Handler) List() gin.HandlerFunc
func (*Handler) Modify ¶
func (*Handler) Modify() gin.HandlerFunc
func (*Handler) NotificationCreate ¶
func (*Handler) NotificationCreate() gin.HandlerFunc
func (*Handler) NotificationList ¶
func (*Handler) NotificationList() gin.HandlerFunc
func (*Handler) NotificationSingleDelete ¶
func (*Handler) NotificationSingleDelete() gin.HandlerFunc
func (*Handler) Show ¶
func (*Handler) Show() gin.HandlerFunc
func (*Handler) SingleDelete ¶
func (*Handler) SingleDelete() gin.HandlerFunc
func (*Handler) StatisticShow ¶
func (*Handler) StatisticShow() gin.HandlerFunc
func (*Handler) TeamAdd ¶
func (*Handler) TeamAdd() gin.HandlerFunc
func (*Handler) TeamCurrentLeave ¶
func (*Handler) TeamCurrentLeave() gin.HandlerFunc
func (*Handler) TeamCurrentShow ¶
func (*Handler) TeamCurrentShow() gin.HandlerFunc
func (*Handler) TeamDelete ¶
func (*Handler) TeamDelete() gin.HandlerFunc
func (*Handler) TeamList ¶
func (*Handler) TeamList() gin.HandlerFunc
type RNotification ¶
type RNotification struct {
Content string `json:"content"`
PublishedTime time.Time `json:"published_time"`
}
func BindNotification ¶
func BindNotification(n *cpt.ContestNotification) *RNotification
func BindNotificationList ¶
func BindNotificationList(ns []cpt.ContestNotification) []*RNotification
type RStatisticSubmission ¶
type RStatisticTeam ¶
type RTeam ¶
type RTeam struct {
TeamID uint `json:"team_id"`
Name string `json:"name"`
Members []*team.RTeamUser `json:"members"`
}
func BindTeamList ¶
func BindTeamList(db *gorm.DB, snapshots []cpt.TeamSnapshot) []*RTeam
type RTeamSubmission ¶
type ReqCreate ¶
type ReqCreate struct {
Name string `json:"name" validate:"max=50,min=1,required" binding:"max=50,min=1,required"`
Description string `json:"description"`
StartTime time.Time `json:"start_time" validate:"required" binding:"required"`
EndTime time.Time `json:"end_time" validate:"required" binding:"required"`
Access uint `json:"access"`
}
type ReqModify ¶
type ReqModify struct {
Name *string `json:"name" validate:"omitempty,max=50,min=1" binding:"omitempty,max=50,min=1"`
Description *string `json:"description"`
StartTime *time.Time `json:"start_time"`
EndTime *time.Time `json:"end_time"`
Access *uint `json:"access"`
IsHidden *bool `json:"is_hidden"`
}
type ReqNotificationCreate ¶
type ReqNotificationCreate struct {
Content string `json:"content" validate:"required" binding:"required"`
}
type ReqTeamAdd ¶
type ReqTeamDelete ¶
type ReqTeamDelete struct {
TeamsID []uint `json:"teams_id"`
}
type RespContest ¶
type RespContest struct {
ID uint `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Access uint `json:"access"`
IsHidden bool `json:"is_hidden,omitempty"`
}
func BindContest ¶
func BindContest(contest *cpt.Contest) *RespContest
func BindContestList ¶
type RespCreate ¶
type RespCreate struct {
Response
ContestID uint `json:"contest_id,omitempty"`
}
type RespList ¶
type RespList struct {
Response
Contests []*RespContest `json:"contests"`
}
type RespNotificationCreate ¶
type RespNotificationCreate struct {
Response
NotificationOrder int `json:"notification_order"`
}
type RespNotificationList ¶
type RespNotificationList struct {
Response
RequestTime time.Time `json:"request_time,omitempty"`
Notifications []*RNotification `json:"notifications"`
}
type RespShow ¶
type RespShow struct {
Response
Contest *RespContest `json:"contest,omitempty"`
}
type RespStatisticShow ¶
type RespStatisticShow struct {
Response
Teams []*RStatisticTeam `json:"teams"`
Submissions []*RStatisticSubmission `json:"submissions"`
}
type RespTeamCurrentShow ¶
type RespTeamCurrentShow struct {
Response
Team *RTeam `json:"team,omitempty"`
IsAdmin bool `json:"is_admin"`
Submissions []*RTeamSubmission `json:"submissions,omitempty"`
}
type RespTeamDelete ¶
type RespTeamDelete struct {
Response
Details []*RespTeamDeleteDetail `json:"details"`
}
type RespTeamDeleteDetail ¶
type RespTeamDeleteDetail struct {
Response
TeamID uint `json:"team_id"`
}
type RespTeamList ¶
type RespTeamList struct {
Response
Teams []*RTeam `json:"teams"`
}
Click to show internal directories.
Click to hide internal directories.