config

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string)

Types

type CodeTemplate

type CodeTemplate struct {
	Alias        string   `json:"alias"`
	Lang         string   `json:"lang"`
	Path         string   `json:"path"`
	Suffix       []string `json:"suffix"`
	BeforeScript string   `json:"before_script"`
	Script       string   `json:"script"`
	AfterScript  string   `json:"after_script"`
}

type Config

type Config struct {
	Template       []CodeTemplate    `json:"template"`
	Default        int               `json:"default"`
	GenAfterParse  bool              `json:"gen_after_parse"`
	CodeforcesHost string            `json:"codeforces_host"`
	SzkopulHost    string            `json:"szkopul_host"`
	SioStaszicHost string            `json:"sio_staszic_host"`
	SioMimuwHost   string            `json:"sio_mimuw_host"`
	SioTalentHost  string            `json:"sio_talent_host"`
	Proxy          string            `json:"proxy"`
	FolderName     map[string]string `json:"folder_name"`
	DefaultNaming  map[string]string `json:"default_naming"`
	DbPath         string            `json:"db_path"`
	PackagesPath   string            `json:"packages_path"`
	// contains filtered or unexported fields
}
var Instance *Config

func (*Config) AddOiTemplate added in v0.9.2

func (c *Config) AddOiTemplate() (err error)

func (*Config) AddTemplate

func (c *Config) AddTemplate() (err error)

func (*Config) RemoveTemplate

func (c *Config) RemoveTemplate() (err error)

func (*Config) SetDbPath

func (c *Config) SetDbPath() (err error)

func (*Config) SetDefaultNaming

func (c *Config) SetDefaultNaming() (err error)

func (*Config) SetDefaultTemplate

func (c *Config) SetDefaultTemplate() (err error)

func (*Config) SetFolderName

func (c *Config) SetFolderName() (err error)

func (*Config) SetGenAfterParse

func (c *Config) SetGenAfterParse() (err error)

func (*Config) SetHost

func (c *Config) SetHost() (err error)

func (*Config) SetProxy

func (c *Config) SetProxy() (err error)

func (*Config) TemplateByAlias

func (c *Config) TemplateByAlias(alias string) []CodeTemplate

Jump to

Keyboard shortcuts

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