config

package
v0.0.0-...-3cadddf Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string, env string) error

Init is using to initialize the configs

Types

type Option

type Option struct {
	Name string `json:"name"` // 应用程序名称
	HTTP struct {
		Host string `json:"host"` // 服务地址
		Port string `json:"port"` // 服务端口
	} `json:"http"`
	Database *db.Config     `json:"mysql"`
	Logger   *logger.Config `json:"logger"`

	Environment string // prod, dev, test
}

Option for configurations

var Instance *Option

AppConfig is the configs for the whole application

Jump to

Keyboard shortcuts

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