config

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfYaml added in v0.0.4

type ConfYaml struct {
	Core     SectionCore     `yaml:"core"`
	Log      SectionLog      `yaml:"log"`
	Db       SectionDb       `yaml:"db"`
	DockerDb SectionDockerDb `yaml:"db"`
}

func Init

func Init(cfg string) (ConfYaml, error)

type Config

type Config struct {
	Name string
}

type SectionAutoTLS added in v0.0.4

type SectionAutoTLS struct {
	Enabled bool   `yaml:"enabled"`
	Folder  string `yaml:"folder"`
	Host    string `yaml:"host"`
}

SectionAutoTLS support Let's Encrypt setting.

type SectionCore added in v0.0.4

type SectionCore struct {
	Enabled      bool           `yaml:"enabled"`
	Mode         string         `yaml:"mode"`
	Name         string         `yaml:"name"`
	Address      string         `yaml:"address"`
	Port         string         `yaml:"port"`
	MaxPingCount int            `yaml:"max_ping_count"`
	JwtSecret    string         `yaml:"jwt_secret"`
	TLS          SectionTLS     `yaml:"tls"`
	AutoTLS      SectionAutoTLS `yaml:"auto_tls"`
}

SectionCore is sub section of config.

type SectionDb added in v0.0.4

type SectionDb struct {
	Name     string `yaml:"name"`
	Addr     string `yaml:"addr"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

SectionDb is sub section of config.

type SectionDockerDb added in v0.0.5

type SectionDockerDb struct {
	Name     string `yaml:"name"`
	Addr     string `yaml:"addr"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

SectionDb is sub section of config.

type SectionLog added in v0.0.4

type SectionLog struct {
	Writers        string `yaml:"writers"`
	LoggerLevel    string `yaml:"logger_level"`
	LoggerFile     string `yaml:"logger_file"`
	LogFormatText  bool   `yaml:"log_format_text"`
	RollingPolicy  string `yaml:"rollingPolicy"`
	LogRotateDate  int    `yaml:"log_rotate_date"`
	LogRotateSize  int    `yaml:"log_rotate_size"`
	LogBackupCount int    `yaml:"log_backup_count"`
}

SectionLog is sub section of config.

type SectionTLS added in v0.0.4

type SectionTLS struct {
	Port     string `yaml:"port"`
	CertPath string `yaml:"cert_path"`
	KeyPath  string `yaml:"key_path"`
}

SectionTLS support tls

Jump to

Keyboard shortcuts

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