config

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EjConfig     `ini:"ejudge"`
	DBConfig     `ini:"database"`
	ServerConfig `ini:"server"`
}

func NewConfig

func NewConfig() (*Config, error)

type DBConfig

type DBConfig struct {
	SqlitePath string `ini:"SQLITE_PATH"`
}

type EjConfig

type EjConfig struct {
	APIKey    string `ini:"API_KEY"`
	APISecret string `ini:"API_SECRET"`
	URL       string `ini:"URL"`
}

type ServerConfig

type ServerConfig struct {
	GinSecret        string `ini:"GIN_SECRET"`
	JWTSecret        string `ini:"JWT_SECRET"`
	PollMaxRuns      int64  `ini:"POLL_MAX_RUNS"`
	PollDelaySeconds int64  `ini:"POLL_DELAY_SECONDS"`
	ReviewLimit      int64  `ini:"REVIEW_LIMIT"`
}

Jump to

Keyboard shortcuts

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