config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 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"`
	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) AddTemplate

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

func (*Config) RemoveTemplate

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

func (*Config) SetCodeforcesHost added in v0.6.0

func (c *Config) SetCodeforcesHost() (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) 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