yaml_config

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 7 Imported by: 5

README

yaml_config

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasePath

func BasePath(project string) string

func CreateContainer

func CreateContainer(prefix string) *containers

CreateContainer 创建一个容器工厂

func SetLogger

func SetLogger(l *zap.Logger)

SetLogger 必须执行此操作设置logger

Types

type YmlConfig

type YmlConfig interface {
	ConfigFileChangeListen()
	Clone(fileName string) YmlConfig
	Get(keyName string) interface{}
	GetString(keyName string) string
	GetBool(keyName string) bool
	GetInt(keyName string) int
	GetInt32(keyName string) int32
	GetInt64(keyName string) int64
	GetFloat64(keyName string) float64
	GetDuration(keyName string) time.Duration
	GetStringSlice(keyName string) []string
}

func CreateYamlFactory

func CreateYamlFactory(relativePath string, fileName string, project string) YmlConfig

CreateYamlFactory 创建一个yaml配置文件工厂 relativePath 相对工作目录的配置文件存储目录 fileName 配置文件名称 project 使用此模块的工程的名称(用以处理单元测试的路径问题)

Jump to

Keyboard shortcuts

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