configs

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v0.0.17

func GetConfig(cfg map[string]interface{}, keys string) (r interface{}, err error)

按照.分割层级循环获取config keys eg my.address

func GetDbDefault added in v0.0.20

func GetDbDefault() string

func GetIrisYAMLConfig added in v0.0.16

func GetIrisYAMLConfig(configName string) iris.Configurator

func GetRedisDefault added in v0.0.20

func GetRedisDefault() string

func GetServerPort added in v0.0.20

func GetServerPort() int

func GetYAMLConfig

func GetYAMLConfig(configFile string) (cfg map[string]interface{}, err error)

Types

type CommonConfigModel added in v0.0.16

type CommonConfigModel struct {
	WebApi ConsulServiceConfig `yaml:webapi`
	Consul string              `yaml:consul`
	Grpc   ConsulServiceConfig `yaml:grpc`
}

type ConsulServiceConfig added in v0.0.16

type ConsulServiceConfig struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Name string `yaml:"name"`
}

Jump to

Keyboard shortcuts

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