conf

package
v0.0.0-...-523602a Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(confPath string)

加载配置文件

Types

type Config

type Config struct {
	AppName   string            `yaml:"app_name" json:"app_name"`
	HttpPort  int16             `yaml:"http_port" json:"http_port"`
	PprofPort int16             `yaml:"pprof_port" json:"pprof_port"`
	Redis     *iredis.RedisConf `yaml:"redis" json:"redis"`
	Mysql     *imysql.MysqlConf `yaml:"mysql" json:"mysql"`
	Mail      *iemail.MailConf  `yaml:"mail" json:"mail"`
	AesKey    string            `yaml:"aes_key" json:"aes_key"`
}

func New

func New() *Config

获取配置对象

func (*Config) String

func (c *Config) String() string

Jump to

Keyboard shortcuts

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