Documentation ¶
Index ¶
- Variables
- func GetFlagVal[T any](name string) (T, bool)
- func Load() error
- func LoadConfigV2() error
- func Save() error
- func SaveConfigV2() error
- func SetConfigPath(path string)
- func SetConfigV2Path(path string)
- type CommonConf
- type DonationConf
- type EmailConf
- type EvalConf
- type Flag
- type FrontendConf
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Common CommonConf Eval EvalConf Email EmailConf Frontend FrontendConf Donations DonationConf )
Functions ¶
func GetFlagVal ¶
func LoadConfigV2 ¶
func LoadConfigV2() error
func SaveConfigV2 ¶
func SaveConfigV2() error
func SetConfigPath ¶
func SetConfigPath(path string)
func SetConfigV2Path ¶
func SetConfigV2Path(path string)
Types ¶
type CommonConf ¶
type CommonConf struct { LogDir string `toml:"log_dir"` DataDir string `toml:"data_dir"` Debug bool `toml:"debug"` HostPrefix string `toml:"host_prefix"` DefaultLang string `toml:"default_language"` DBDSN string `toml:"db_dsn"` TestMaxMemKB int `toml:"test_max_mem_kb"` }
CommonConf is the data required for all services
type DonationConf ¶
type EmailConf ¶
type EmailConf struct { Enabled bool `toml:"enabled"` Host string `toml:"host"` Username string `toml:"username"` Password string `toml:"password"` }
EmailConf is the data required for the email part
type EvalConf ¶
type EvalConf struct { IsolatePath string `toml:"isolatePath"` // Address string `toml:"address"` NumConcurrent int `toml:"num_concurrent"` GlobalMaxMem int64 `toml:"global_max_mem_kb"` StartingBox int `toml:"starting_box"` }
EvalConf is the data required for the eval service
type FrontendConf ¶
type FrontendConf struct { // Note that BannedHotProblems only counts for problems that are sorted // using the hotness filter (that is, had submissions in the last 7 days) // Basically, banned problems are considered to have had 0 submissions in the last 7 days BannedHotProblems []int `toml:"banned_hot_problems"` }
Click to show internal directories.
Click to hide internal directories.