config

package
v0.0.0-...-f0d4a1f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ConfPath = "conf/config.yaml"

Variables

View Source
var SupportConfigFileType = []string{"yml", "yaml"}

Functions

This section is empty.

Types

type Conf

type Conf struct {
	DbTypeMap     map[string]string `yaml:"db_type_map"` // DB
	GoNullableMap map[string]string `yaml:"go_nullable_map"`
	ApiTypeMap    map[string]string `yaml:"api_type_map"`
}

Conf 配置环境上下文

var GlobalConf Conf

func NewGlobalConfig

func NewGlobalConfig(loader *Loader) (*Conf, error)

NewGlobalConfig 初始化全局配置

type Loader

type Loader struct{}

func NewConfigLoader

func NewConfigLoader() *Loader

func (*Loader) LoadConfigToEntity

func (l *Loader) LoadConfigToEntity(path string, entity any) error

Jump to

Keyboard shortcuts

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