conf

package
v0.0.0-...-37e6509 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EnvSep = ","
)

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(dest interface{}, defaultConfig string)

func LoadEnvs

func LoadEnvs(envs map[string]interface{}) error

Types

type DBConfig

type DBConfig struct {
	File    string        `json:"file" yaml:"file"`
	Timeout time.Duration `json:"timeout" yaml:"timeout"`
}

type MqttConfig

type MqttConfig struct {
	BrokerAddr     string        `json:"broker_addr" yaml:"broker_addr"`
	ConnectTimeout time.Duration `json:"connect_timeout" yaml:"connect_timeout"`
	RequestTimeout time.Duration `json:"request_timeout" yaml:"request_timeout"`
}

Jump to

Keyboard shortcuts

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