Documentation ¶
Index ¶
- func AsteroidGreetData() (result asteroid.Greet)
- func CalculateRoundScore(round int)
- func CheckDown(c *gin.Context) (int, interface{})
- func CleanGameBoxStatus()
- func DeleteChallenge(c *gin.Context) (int, interface{})
- func DeleteGameBox(c *gin.Context) (int, interface{})
- func EditChallenge(c *gin.Context) (int, interface{})
- func EditGameBox(c *gin.Context) (int, interface{})
- func ExportFlag(c *gin.Context) (int, interface{})
- func GenerateFlag(c *gin.Context) (int, interface{})
- func GetAllChallenges(c *gin.Context) (int, interface{})
- func GetFlags(c *gin.Context) (int, interface{})
- func GetGameBoxes(c *gin.Context) (int, interface{})
- func GetLatestScoreRound() int
- func GetOthersGameBox(c *gin.Context) (int, interface{})
- func GetRankListTitle() []string
- func GetSelfGameBoxes(c *gin.Context) (int, interface{})
- func NewChallenge(c *gin.Context) (int, interface{})
- func NewGameBoxes(c *gin.Context) (int, interface{})
- func RefreshFlag()
- func ResetAllGameBoxes(c *gin.Context) (int, interface{})
- func SetRankList()
- func SetRankListTitle()
- func SetVisible(c *gin.Context) (int, interface{})
- func SubmitFlag(c *gin.Context) (int, interface{})
- func TestAllSSH(c *gin.Context) (int, interface{})
- func TestSSH(c *gin.Context) (int, interface{})
- type GameBoxInfo
- type GameBoxStatus
- type RankItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsteroidGreetData ¶
func CalculateRoundScore ¶
func CalculateRoundScore(round int)
CalculateRoundScore will calculate the score of the given round.
func CleanGameBoxStatus ¶
func CleanGameBoxStatus()
func DeleteChallenge ¶
DeleteChallenge is delete challenge handler for manager.
func DeleteGameBox ¶
DeleteGameBox deletes the game box for manager.
func EditChallenge ¶
EditChallenge is edit challenge handler for manager.
func EditGameBox ¶
EditGameBox is edit gamebox handler for manager.
func ExportFlag ¶
ExportFlag exports the flags of a challenge.
func GenerateFlag ¶
GenerateFlag is the generate flag handler for manager.
func GetAllChallenges ¶
GetAllChallenges get all challenges from the database.
func GetGameBoxes ¶
GetGameBoxes returns the gameboxes for manager.
func GetLatestScoreRound ¶
func GetLatestScoreRound() int
func GetOthersGameBox ¶
GetOthersGameBox returns the other teams' gameboxes if the config is set to true.
func GetRankListTitle ¶
func GetRankListTitle() []string
GetRankListTitle returns the ranking list table header from the cache.
func GetSelfGameBoxes ¶
GetSelfGameBoxes returns the gameboxes which belong to the team.
func NewChallenge ¶
NewChallenge is new challenge handler for manager.
func NewGameBoxes ¶
NewGameBoxes is add a new gamebox handler for manager.
func ResetAllGameBoxes ¶
func SetRankListTitle ¶
func SetRankListTitle()
SetRankListTitle will save the visible challenges' headers into cache.
func SetVisible ¶
SetVisible is setting challenge visible status handler. When a challenge's visible status changed, all the teams' challenge scores and their total scores will be calculated immediately. The ranking list will also be updated.
func SubmitFlag ¶
SubmitFlag is submit flag handler for teams.
func TestAllSSH ¶
Types ¶
type GameBoxInfo ¶
GameBoxInfo contains the gamebox info which for manager. Manager can get the gamebox's score.
type GameBoxStatus ¶
GameBoxStatus contains the gamebox info which for team.
type RankItem ¶
type RankItem struct { TeamID uint TeamName string TeamLogo string Score float64 GameBoxStatus interface{} // Ordered by challenge ID. }
RankItem is used to create the ranking list.
func GetManagerRankList ¶
func GetManagerRankList() []*RankItem
GetManagerRankList returns the ranking list data for manager from the cache.
func GetRankList ¶
func GetRankList() []*RankItem
GetRankList returns the ranking list data for team from the cache.