Documentation ¶
Index ¶
- Variables
- func BindEnvs(iface interface{}, parts ...string)
- func Execute()
- func NewGlueCmd(v *viper.Viper) *cobra.Command
- func NewJudgeCmd(v *viper.Viper) *cobra.Command
- func NewMigrateCommand(v *viper.Viper) *cobra.Command
- func NewTestProblemCmd() *cobra.Command
- func NewWebCmd(v *viper.Viper) *cobra.Command
- type GlueConfig
- type JudgeConfig
- type MigrateCmdArgs
- type ProblemStore
- type TestProblemConfig
- type WebConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultGlueConfig = GlueConfig{
Database: _dockerDatabaseConfig,
}
View Source
var DefaultJudgeConfig = JudgeConfig{ Port: 8080, ProblemsDir: "/njudge_problems", Isolate: true, IsolateSandboxRange: []int{400, 444}, UpdateStatusLimitEvery: 5 * time.Second, Concurrency: 4, }
View Source
var DefaultTestProblemConfig = TestProblemConfig{ ProblemDir: ".", Language: "cpp17", SolutionPath: "./sol/solution.cpp", Verbose: false, IsolateSandboxRange: []int{10, 99}, Isolate: true, Concurrency: 4, }
View Source
var DefaultWebConfig = WebConfig{ ProblemsDir: "/njudge_problems", Config: web.Config{ Mode: web.ModeDevelopment, Url: "http://localhost:5555", Port: "5555", TimeZone: "Europe/Budapest", CookieSecret: "svp3r_s3cr3t", GoogleAuth: web.GoogleAuthConfig{}, Sendgrid: web.SendgridConfig{}, SMTP: web.SMTPConfig{}, DatabaseConfig: _dockerDatabaseConfig, }, }
View Source
var RootCmd = &cobra.Command{
Use: "njudge",
Version: "v0.5.0",
Long: "cli tool to manage njudge instance",
}
Functions ¶
func NewTestProblemCmd ¶ added in v0.4.0
Types ¶
type GlueConfig ¶ added in v0.4.0
type GlueConfig struct {
Database web.DatabaseConfig `mapstructure:"db"`
}
type JudgeConfig ¶ added in v0.4.0
type JudgeConfig struct { Port int `mapstructure:"port" yaml:"port"` ProblemsDir string `mapstructure:"problems_dir" yaml:"problems_dir"` Isolate bool `mapstructure:"isolate" yaml:"isolate"` IsolateSandboxRange []int `mapstructure:"isolate_sandbox_range" yaml:"isolate_sandbox_range"` UpdateStatusLimitEvery time.Duration `mapstructure:"update_status_limit_every" yaml:"update_status_limit_every"` Concurrency int `mapstructure:"concurrency" yaml:"concurrency"` }
type MigrateCmdArgs ¶
type ProblemStore ¶ added in v0.4.0
type ProblemStore struct {
// contains filtered or unexported fields
}
func (ProblemStore) GetProblem ¶ added in v0.4.0
func (p ProblemStore) GetProblem(s string) (problems.Problem, error)
type TestProblemConfig ¶ added in v0.4.0
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Command gotext-update-templates merge translations and generates a catalog.
|
Command gotext-update-templates merge translations and generates a catalog. |
Click to show internal directories.
Click to hide internal directories.