confManager

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfInitialized bool = false
)

Functions

func GetAll

func GetAll() map[string]interface{}

GetAll 获取所有配置

func GetBool

func GetBool(key string) bool

GetBool 获取布尔配置

func GetFloat64

func GetFloat64(key string) float64

GetFloat64 获取浮点数配置

func GetInt

func GetInt(key string) int

GetInt 获取整数配置

func GetString

func GetString(key string) string

GetString 获取字符串配置

func GetStringMap

func GetStringMap(key string) map[string]interface{}

GetStringMap 获取字符串映射配置

func GetStringSlice

func GetStringSlice(key string) []string

GetStringSlice 获取字符串切片配置

func InitConfig

func InitConfig(configPath string, configName string, configType string) error

InitConfig 初始化配置管理器

func Set

func Set(key string, value interface{})

Set 设置配置项

func SetDefault

func SetDefault(key string, value interface{})

SetDefault 设置单个默认配置项

func SetDefaults

func SetDefaults(defaults []models.DefaultKV)

SetDefaults 批量设置默认配置项

Types

This section is empty.

Jump to

Keyboard shortcuts

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