handler

package
v0.0.0-...-80dae45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MpMatchCacheRefreshTime = 10 * time.Second // 缓存即将过期时,异步刷新
	MpMatchCacheExpiration  = 60 * time.Second // 缓存过期时间
	MpMatchDisabled         = false            // 是否禁用
)
View Source
const BilibiliOfficialKey = "bilibili_official"
View Source
const HistoryMatchKey = "history_match"

Variables

View Source
var SeasonCompleteFormMap = map[string][]byte{
	"2024": static.CompleteFormBytes2024,
	"2025": static.CompleteFormBytes2025,
}
View Source
var SeasonCompleteFormRankMap = map[string][]byte{
	"2024": {},
	"2025": static.CompleteFormRankBytes2025,
}
View Source
var SeasonRankScoreMap = map[string][]byte{
	"2024": static.RankScoreBytes2024,
	"2025": static.RankScoreBytes2025,
}

Functions

func GetCompleteFormMap

func GetCompleteFormMap(season string) (map[string]CompleteForm, error)

GetCompleteFormMap 获取完整形态

func HistoryMatchHandler

func HistoryMatchHandler(c iris.Context)

func MatchIDHandler

func MatchIDHandler(c iris.Context)

func MatchOrderHandler

func MatchOrderHandler(c iris.Context)

func MpMatchHandler

func MpMatchHandler(c iris.Context)

func RMStaticHandler

func RMStaticHandler(c iris.Context)

func RankListHandler

func RankListHandler(c iris.Context)

func RedirectRouteHandlerFactory

func RedirectRouteHandlerFactory(param RedirectRouteHandlerParam) func(c iris.Context)

RedirectRouteHandlerFactory 处理重定向路由的工厂函数

func TeamInfoHandler

func TeamInfoHandler(c iris.Context)

Types

type BilibiliOfficial

type BilibiliOfficial struct {
	School   string `json:"school"`
	Nickname string `json:"nickname"`
	Uid      int64  `json:"uid"`
}

type CompleteForm

type CompleteForm struct {
	Rank                  int    `json:"rank"`
	School                string `json:"school"`
	Team                  string `json:"team"`
	Score                 int    `json:"score"`
	InitialCoinDocument   int    `json:"initialCoinDocument"`
	LevelDocument         string `json:"levelDocument"`
	InitialCoinTechnology int    `json:"initialCoinTechnology"`
	LevelTechnology       string `json:"levelTechnology"`
	InitialCoinTotal      int    `json:"initialCoinTotal"`
}

type CompleteFormRank

type CompleteFormRank struct {
	Rank   int    `json:"rank"`
	School string `json:"school"`
	Team   string `json:"team"`
}

type HistoryMatch

type HistoryMatch struct {
	BlueCollegeName      string `json:"blueCollegeName"`
	BlueSideWinGameCount int64  `json:"blueSideWinGameCount"`
	BlueTeamName         string `json:"blueTeamName"`
	Group                string `json:"group"`
	Order                int64  `json:"order"`
	OrderNumber          int64  `json:"orderNumber"`
	RedCollegeName       string `json:"redCollegeName"`
	RedSideWinGameCount  int64  `json:"redSideWinGameCount"`
	RedTeamName          string `json:"redTeamName"`
	Season               int64  `json:"season"`
	Zone                 string `json:"zone"`
}

type HistoryMatchList

type HistoryMatchList []HistoryMatch

type HistoryMatchMap

type HistoryMatchMap map[string]HistorySeason

type HistorySeason

type HistorySeason struct {
	Season  string         `json:"season"`
	Matches []HistoryMatch `json:"matches"`
}

type MpMatchData

type MpMatchData struct {
	MatchId    int     `json:"matchId"`
	RedCount   int     `json:"redCount"`
	BlueCount  int     `json:"blueCount"`
	TieCount   int     `json:"tieCount"`
	TotalCount int     `json:"totalCount"`
	RedRate    float64 `json:"redRate"`
	BlueRate   float64 `json:"blueRate"`
	TieRate    float64 `json:"tieRate"`
}

type MpMatchDstResp

type MpMatchDstResp struct {
	List []MpMatchData `json:"list"`
}

type MpMatchSrcResp

type MpMatchSrcResp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		RedCount  int `json:"redCount"`
		BlueCount int `json:"blueCount"`
		TieCount  int `json:"tieCount"`
	} `json:"data"`
}

type RankListItem

type RankListItem struct {
	RankScoreItem RankScoreItem `json:"rankScoreItem"`
	CompleteForm  CompleteForm  `json:"completeForm"`
}

type RankScoreItem

type RankScoreItem struct {
	Rank          int     `json:"rank"`
	SchoolChinese string  `json:"schoolChinese"`
	SchoolEnglish string  `json:"schoolEnglish"`
	Score         float64 `json:"score"`
}

type RedirectRouteHandlerParam

type RedirectRouteHandlerParam struct {
	Name         string
	CacheControl string
	OriginalUrl  string
	Static       bool
	SeasonMap    map[string][]byte
	Data         []byte
}

RedirectRouteHandlerParam 定义重定向路由处理器的参数

type TeamInfo

type TeamInfo struct {
	CollegeName string `json:"collegeName"`
	BilibiliUid int64  `json:"bilibiliUid"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL