Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewSetting ¶ added in v1.63.4
func NewSetting(attrs ...SettingAttributes) (v *viper.Viper, err error)
Types ¶
type AttrConfig ¶
type AttrConfig struct {
// contains filtered or unexported fields
}
******************** 配置文件属性 ********************
func Content ¶
func Content(content any) AttrConfig
func (AttrConfig) Register ¶
func (my AttrConfig) Register(setting *Setting)
type AttrDefaultName ¶ added in v1.63.6
type AttrDefaultName struct {
// contains filtered or unexported fields
}
******************** 配置文件属性 ********************
func DefaultName ¶ added in v1.63.6
func DefaultName(name string) AttrDefaultName
func (AttrDefaultName) Register ¶ added in v1.63.6
func (my AttrDefaultName) Register(setting *Setting)
type AttrEnvName ¶
type AttrEnvName struct {
// contains filtered or unexported fields
}
******************** 配置文件属性 ********************
func EnvName ¶
func EnvName(envName string) AttrEnvName
func (AttrEnvName) Register ¶
func (my AttrEnvName) Register(setting *Setting)
type AttrFilename ¶ added in v1.63.6
type AttrFilename struct {
// contains filtered or unexported fields
}
******************** 配置文件属性 ********************
func Filename ¶ added in v1.63.6
func Filename(filename string) AttrFilename
func (AttrFilename) Register ¶ added in v1.63.6
func (my AttrFilename) Register(setting *Setting)
type AttrOnChange ¶
type AttrOnChange struct {
// contains filtered or unexported fields
}
******************** 配置文件属性 ********************
func (AttrOnChange) Register ¶
func (my AttrOnChange) Register(setting *Setting)
type Setting ¶
type Setting struct {
// contains filtered or unexported fields
}
******************** 配置文件 ******************** Setting
func (Setting) SetAttrs ¶
func (my Setting) SetAttrs(attrs ...SettingAttributes) Setting
type SettingAttributes ¶
type SettingAttributes interface{ Register(setting *Setting) }
******************** 配置文件属性 ********************
Click to show internal directories.
Click to hide internal directories.