config

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Container = dig.New()

Functions

func MysqlGroup added in v0.9.0

func MysqlGroup() *mysqlGroup

MysqlGroup 读取多条mysql配置项

func ReadFromEnvironment added in v0.8.0

func ReadFromEnvironment()

ReadFromEnvironment read from system environment

func ReadFromFile added in v0.8.0

func ReadFromFile(path string) error

ReadFromFile read from file

func Redis added in v0.7.6

func Redis() (options *redisConfig)

func Server added in v0.7.6

func Server() (options *server)

Server return server config

Types

type DataSource added in v0.9.0

type DataSource struct {
	// host
	Host string `mapstruture:"host"`

	// 端口号
	Port int `mapstructure:"port"`

	// 用户名
	User string `mapstructure:"user"`

	// 密码
	Password string `mapstructure:"password"`

	// 数据库名称
	Name string `mapstructure:"name"`
}

DataSource 连接配置

Jump to

Keyboard shortcuts

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