config

package
v0.0.0-...-22e259c Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodingProviderConfig

type CodingProviderConfig struct {
	Backend          string   `yaml:"backend"`
	Checkscript      string   `yaml:"checkscript"`
	CompleteLangList []string `yaml:"complete"`
	ConvertLangList  []string `yaml:"convert"`
	ExplainLangList  []string `yaml:"explain"`
	FixerrorLangList []string `yaml:"fixerror"`
	GentestLangList  []string `yaml:"gentest"`
}

type GateWayConfig

type GateWayConfig struct {
	Port        uint16         `yaml:"port"`
	Ssl         SslConfig      `yaml:"ssl"`
	Secret      string         `yaml:"secret"`
	Dev         bool           `yaml:"dev"`
	LogDir      string         `yaml:"logdir"`
	TokenTtl    int            `yaml:"tokenttl"`
	CheckScript string         `yaml:"checkscript"`
	Provider    ProviderConfig `yaml:"provider"`
}

func ParseConfig

func ParseConfig(fileName string) (*GateWayConfig, error)

type ProviderConfig

type ProviderConfig struct {
	CodingProviderList []CodingProviderConfig `yaml:"coding"`
}

type SslConfig

type SslConfig struct {
	Enable bool   `yaml:"enable"`
	Cert   string `yaml:"cert"`
	Key    string `yaml:"key"`
}

Jump to

Keyboard shortcuts

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