Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StoreDynamicSecrets ¶
func StoreDynamicSecrets(s *DynamicSecrets) error
Types ¶
type Config ¶
type Config struct { ListenAddr string `json:"listen_addr"` SecureListenAddr string `json:"secure_listen_addr"` AllowedSecureDomains []string `json:"allowed_secure_domains"` BaseURL string `json:"base_url"` Contests []Contest `json:"contests"` RefreshDuration time.Duration `json:"refresh_duration"` ErrorRefreshDuration time.Duration `json:"error_refresh_duration"` StandingsForJudge bool `json:"standings_for_judge"` PageSize int `json:"page_size"` LoginWhitelistRegex *string `json:"login_whitelist_regex"` LoginBlacklistRegex *string `json:"login_blacklist_regex"` MaxScorePerTask *float64 `json:"max_score_per_task"` DisplayNames bool `json:"display_names"` DisplayTeams bool `json:"display_teams"` Teams []TeamConfig `json:"teams"` }
func LoadConfig ¶
func (*Config) FillDefaults ¶
func (c *Config) FillDefaults()
type DynamicSecrets ¶
func LoadDynamicSecrets ¶
func LoadDynamicSecrets() (*DynamicSecrets, error)
type FilterMode ¶
type FilterMode int
const ( FilterModeWhitelist FilterMode = iota FilterModeBlacklist )
type Header ¶
type Header struct {
Tasks []TaskHeader `json:"tasks"`
}
type Participant ¶
type Participant struct { Login string `json:"login"` Name string `json:"name"` TeamID int `json:"team_id"` Tasks []ParticipantCell `json:"tasks"` Total float64 `json:"total"` }
type ParticipantCell ¶
type ParticipantCell struct {
Score float64 `json:"score"`
}
type Presenter ¶
type Presenter struct {
// contains filtered or unexported fields
}
func NewPresenter ¶
type Standings ¶
type Standings struct { Tag string `json:"tag"` Header Header `json:"header"` Participants []Participant `json:"participants"` }
func MergeStandings ¶
func (*Standings) FilterPrefix ¶
func (s *Standings) FilterPrefix(loginPrefix string, mode FilterMode) *Standings
func (*Standings) FilterRegex ¶
func (s *Standings) FilterRegex(loginRegex string, mode FilterMode) (*Standings, error)
func (*Standings) FilterTeam ¶
func (*Standings) ValidateAndFix ¶
type StaticSecrets ¶
type StaticSecrets struct { ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` }
func LoadStaticSecrets ¶
func LoadStaticSecrets() (*StaticSecrets, error)
type TaskHeader ¶
type TeamAssigner ¶
type TeamAssigner struct {
// contains filtered or unexported fields
}
func NewTeamAssigner ¶
func NewTeamAssigner(conf *Config) (*TeamAssigner, error)
func (*TeamAssigner) AssignTeam ¶
func (t *TeamAssigner) AssignTeam(p Participant) Participant
type TeamConfig ¶
Click to show internal directories.
Click to hide internal directories.