config

package
v0.0.0-...-1ca43b3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalConfig = &Config{}

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceConfig *ServiceConfig `yaml:"serviceConfig"`
	LogConfig     *LogConfig     `yaml:"logConfig"`
	DbConfig      *DbConfig      `yaml:"dbConfig"`
}

func ParseConf

func ParseConf(path string, conf *Config) *Config

type DbConfig

type DbConfig struct {
	RedisAddr   string `yaml:"redisAddr"`
	RedisPasswd string `yaml:"redisPasswd"`
	RedisMode   string `yaml:"redisMode"`
	EsUrl       string `yaml:"esUrl"`
	EsUsername  string `yaml:"esUsername"`
	EsPasswd    string `yaml:"esPasswd"`
}

type LogConfig

type LogConfig struct {
	LogPath     string `yaml:"logPath"`
	LogLevel    string `yaml:"logLevel"`
	LogMaxAge   int    `yaml:"logMaxAge"`
	LogMaxSize  int    `yaml:"logMaxSize"`
	LogMode     string `yaml:"logMode"`
	BackupCount int    `yaml:"backupCount"`
}

type ServiceConfig

type ServiceConfig struct {
	Env string `yaml:"env"`
}

Jump to

Keyboard shortcuts

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