Documentation ¶
Index ¶
- Variables
- func GlobalConfig() *globalConfig
- func ParseTagSetting(str string, sep string, settings any)
- func RegisterDeferFunc(deferf ...func())
- func Start(conf Config, dao Dao, configCenter ...conf_center.ConfigCenter) func()
- type BuiltinConfig
- type Config
- type Dao
- type EmbeddedPresets
- type Encoder
- type FileConfig
- type FlagTagSettings
- type InitAfterInject
- type InitAfterInjectConfig
- type InitAfterInjectConfigWithInitConfig
- type InitAfterInjectWithInitConfig
- type InitBeforeInject
- type InitBeforeInjectWithInitConfig
- type InitTagSettings
- type SingleFileConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbeddedPresetsType = reflect.TypeOf((*EmbeddedPresets)(nil)).Elem()
Functions ¶
func GlobalConfig ¶
func GlobalConfig() *globalConfig
func ParseTagSetting ¶
ParseTagSetting default sep ;
func RegisterDeferFunc ¶
func RegisterDeferFunc(deferf ...func())
func Start ¶
func Start(conf Config, dao Dao, configCenter ...conf_center.ConfigCenter) func()
Types ¶
type BuiltinConfig ¶
type Config ¶
type Config interface { // 注入之前设置默认值 InitBeforeInject // 注入之后初始化 InitAfterInject }
type Dao ¶
type Dao interface { InitBeforeInject // 注入config后执行 InitAfterInjectConfig // 注入dao后执行 InitAfterInject }
type EmbeddedPresets ¶
type EmbeddedPresets struct { }
func (EmbeddedPresets) InitAfterInject ¶
func (u EmbeddedPresets) InitAfterInject()
func (EmbeddedPresets) InitAfterInjectConfig ¶
func (u EmbeddedPresets) InitAfterInjectConfig()
func (EmbeddedPresets) InitBeforeInject ¶
func (u EmbeddedPresets) InitBeforeInject()
type FileConfig ¶
type FileConfig struct { // 模块名 initconf.BasicConfig EnvConfig *initconf.EnvConfig // field name can be dev,test,prod ... and anything you like }
FileConfig unused example 配置文件映射结构体,每个启动都有一个必要的配置文件,用于初始化基本配置及配置中心配置
type FlagTagSettings ¶
type InitAfterInject ¶
type InitAfterInject interface {
InitAfterInject()
}
type InitAfterInjectConfig ¶
type InitAfterInjectConfig interface {
InitAfterInjectConfig()
}
type InitAfterInjectConfigWithInitConfig ¶
type InitAfterInjectConfigWithInitConfig interface {
InitAfterInjectConfigWithInitConfig(*initconf.InitConfig)
}
type InitAfterInjectWithInitConfig ¶
type InitAfterInjectWithInitConfig interface {
InitAfterInjectWithInitConfig(*initconf.InitConfig)
}
type InitBeforeInject ¶
type InitBeforeInject interface {
InitBeforeInject()
}
type InitBeforeInjectWithInitConfig ¶
type InitBeforeInjectWithInitConfig interface {
InitBeforeInjectWithInitConfig(*initconf.InitConfig)
}
type InitTagSettings ¶
type InitTagSettings struct { ConfigName string `meta:"config"` DefaultValue string `meta:"default"` }
func ParseInitTagSettings ¶
func ParseInitTagSettings(str string) *InitTagSettings
type SingleFileConfig ¶
type SingleFileConfig struct { initconf.BasicConfig initconf.EnvConfig }
SingleFileConfig This is for illustrative purposes only and is not for practical use
Source Files ¶
Click to show internal directories.
Click to hide internal directories.