Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrScope = "config" ErrCodeParameter = 1 )
Variables ¶
This section is empty.
Functions ¶
func CheckFileWritable ¶
Check this file path is writable. Will create directories first.
Types ¶
type Config ¶
type Config struct { ConfigPath string `yaml:"config"` AccessToken string `yaml:"access_token" validate:"required"` MaxConcurrent int `yaml:"max_concurrent"` LogRespHead int `yaml:"log_resp_head"` StartPoint `yaml:"start_point"` Network Net `yaml:"network"` Output Output `yaml:"output"` Github Github `yaml:"github"` Cli Cli `yaml:"cli"` Log Loggers `yaml:"log"` }
func GetConfig ¶
func GetConfig(cp ConfigParser) (Config, error)
func NewProtectedConfig ¶
type ConfigParser ¶
type StartPoint ¶
type YAMLParser ¶
type YAMLParser struct {
// contains filtered or unexported fields
}
func NewYAMLParser ¶
func NewYAMLParser(fpath string) (*YAMLParser, error)
func (*YAMLParser) Parse ¶
func (p *YAMLParser) Parse() (Config, error)
Click to show internal directories.
Click to hide internal directories.