Documentation
¶
Index ¶
- func AppendConfigFromAbsPath(fileName string)
- func AppendConfigFromRelativePath(fileName string)
- func AppendJsonFile(filePath string)
- func AppendPropertyFile(filePath string)
- func AppendYamlFile(filePath string)
- func GetConfigValue(c *gin.Context)
- func GetConfigValues(c *gin.Context)
- func GetValue(key string) interface{}
- func GetValueBool(key string) bool
- func GetValueBoolDefault(key string, defaultValue bool) bool
- func GetValueFloat32(key string) float32
- func GetValueFloat32Default(key string, defaultValue float32) float32
- func GetValueFloat64(key string) float64
- func GetValueFloat64Default(key string, defaultValue float64) float64
- func GetValueInt(key string) int
- func GetValueInt16(key string) int16
- func GetValueInt16Default(key string, defaultValue int16) int16
- func GetValueInt32(key string) int32
- func GetValueInt32Default(key string, defaultValue int32) int32
- func GetValueInt64(key string) int64
- func GetValueInt64Default(key string, defaultValue int64) int64
- func GetValueInt8(key string) int8
- func GetValueInt8Default(key string, defaultValue int8) int8
- func GetValueIntDefault(key string, defaultValue int) int
- func GetValueObject(key string, targetPtrObj interface{}) error
- func GetValueString(key string) string
- func GetValueStringDefault(key, defaultValue string) string
- func GetValueUInt(key string) uint
- func GetValueUInt16(key string) uint16
- func GetValueUInt16Default(key string, defaultValue uint16) uint16
- func GetValueUInt32(key string) uint32
- func GetValueUInt32Default(key string, defaultValue uint32) uint32
- func GetValueUInt64(key string) uint64
- func GetValueUInt64Default(key string, defaultValue uint64) uint64
- func GetValueUInt8(key string) uint8
- func GetValueUInt8Default(key string, defaultValue uint8) uint8
- func GetValueUIntDefault(key string, defaultValue uint) uint
- func LoadConfig()
- func LoadConfigFromAbsPath(resourceAbsPath string)
- func LoadConfigFromRelativePath(resourceAbsPath string)
- func LoadJsonFile(filePath string)
- func LoadPropertyFile(filePath string)
- func LoadSpringConfig(AConfig any)
- func LoadYamlConfig(fileName string, AConfig any, handler func(data []byte, AConfig any) error) error
- func LoadYamlConfigByAbsolutPath(path string, AConfig any, handler func(data []byte, AConfig any) error) error
- func LoadYamlFile(filePath string)
- func SetValue(key string, value interface{})
- func UpdateConfig(c *gin.Context)
- type AppApplication
- type AppProfile
- type ApplicationProperty
- type BaseConfig
- type EnvProperty
- type LoggerConfig
- type ServerConfig
- type StorageConnectionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendConfigFromAbsPath ¶ added in v0.3.0
func AppendConfigFromAbsPath(fileName string)
AppendConfigFromAbsPath 追加配置:绝对路径的配置文件
func AppendConfigFromRelativePath ¶ added in v0.3.0
func AppendConfigFromRelativePath(fileName string)
AppendConfigFromRelativePath 追加配置:相对路径的配置文件
func AppendJsonFile ¶ added in v0.3.0
func AppendJsonFile(filePath string)
func AppendPropertyFile ¶ added in v0.3.0
func AppendPropertyFile(filePath string)
func AppendYamlFile ¶ added in v0.3.0
func AppendYamlFile(filePath string)
func GetConfigValue ¶ added in v0.3.0
func GetConfigValues ¶ added in v0.3.0
func GetValueBool ¶ added in v0.3.0
func GetValueBoolDefault ¶ added in v0.3.0
func GetValueFloat32 ¶ added in v0.3.0
func GetValueFloat32Default ¶ added in v0.3.0
func GetValueFloat64 ¶ added in v0.3.0
func GetValueFloat64Default ¶ added in v0.3.0
func GetValueInt ¶ added in v0.3.0
func GetValueInt16 ¶ added in v0.3.0
func GetValueInt16Default ¶ added in v0.3.0
func GetValueInt32 ¶ added in v0.3.0
func GetValueInt32Default ¶ added in v0.3.0
func GetValueInt64 ¶ added in v0.3.0
func GetValueInt64Default ¶ added in v0.3.0
func GetValueInt8 ¶ added in v0.3.0
func GetValueInt8Default ¶ added in v0.3.0
func GetValueIntDefault ¶ added in v0.3.0
func GetValueObject ¶ added in v0.3.0
func GetValueString ¶ added in v0.3.0
func GetValueStringDefault ¶ added in v0.3.0
func GetValueUInt ¶ added in v0.3.0
func GetValueUInt16 ¶ added in v0.3.0
func GetValueUInt16Default ¶ added in v0.3.0
func GetValueUInt32 ¶ added in v0.3.0
func GetValueUInt32Default ¶ added in v0.3.0
func GetValueUInt64 ¶ added in v0.3.0
func GetValueUInt64Default ¶ added in v0.3.0
func GetValueUInt8 ¶ added in v0.3.0
func GetValueUInt8Default ¶ added in v0.3.0
func GetValueUIntDefault ¶ added in v0.3.0
func LoadConfig ¶
func LoadConfig()
func LoadConfigFromAbsPath ¶ added in v0.3.0
func LoadConfigFromAbsPath(resourceAbsPath string)
LoadConfigFromAbsPath 加载绝对文件路径
func LoadConfigFromRelativePath ¶ added in v0.3.0
func LoadConfigFromRelativePath(resourceAbsPath string)
LoadConfigFromRelativePath 加载相对文件路径
func LoadJsonFile ¶ added in v0.3.0
func LoadJsonFile(filePath string)
func LoadPropertyFile ¶ added in v0.3.0
func LoadPropertyFile(filePath string)
func LoadSpringConfig ¶ added in v0.3.0
func LoadSpringConfig(AConfig any)
func LoadYamlConfig ¶ added in v0.3.0
func LoadYamlConfig(fileName string, AConfig any, handler func(data []byte, AConfig any) error) error
LoadYamlConfig read fileName from private path fileName,eg:application.yml, and transform it to AConfig note: AConfig must be a pointer
func LoadYamlConfigByAbsolutPath ¶ added in v0.3.0
func LoadYamlConfigByAbsolutPath(path string, AConfig any, handler func(data []byte, AConfig any) error) error
LoadYamlConfigByAbsolutPath read fileName from absolute path fileName,eg:/home/isc-gobase/application.yml, and transform it to AConfig note: AConfig must be a pointer
func LoadYamlFile ¶ added in v0.3.0
func LoadYamlFile(filePath string)
func UpdateConfig ¶ added in v0.3.0
Types ¶
type AppApplication ¶
type AppApplication struct {
Name string
}
type AppProfile ¶
type AppProfile struct {
Active string
}
type ApplicationProperty ¶ added in v0.3.0
type BaseConfig ¶ added in v0.3.0
type BaseConfig struct { Application AppApplication Profiles AppProfile }
BaseConfig base前缀
var BaseCfg BaseConfig
type EnvProperty ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.