config

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

*

  • 配置 *
  • @create 2021-6-19
  • @author deatil

func New added in v1.0.1002

func New(adapter interfaces.Adapter) *Config

构造函数

func (*Config) Get

func (this *Config) Get(keyName string) any

Get 一个原始值

func (*Config) GetAdapter

func (this *Config) GetAdapter() interfaces.Adapter

获取适配器

func (*Config) GetBool

func (this *Config) GetBool(keyName string) bool

GetBool

func (*Config) GetDuration

func (this *Config) GetDuration(keyName string) time.Duration

GetDuration

func (*Config) GetFloat64

func (this *Config) GetFloat64(keyName string) float64

float64

func (*Config) GetInt

func (this *Config) GetInt(keyName string) int

GetInt

func (*Config) GetInt32

func (this *Config) GetInt32(keyName string) int32

GetInt32

func (*Config) GetInt64

func (this *Config) GetInt64(keyName string) int64

GetInt64

func (*Config) GetIntSlice

func (this *Config) GetIntSlice(keyName string) []int

GetIntSlice

func (*Config) GetString

func (this *Config) GetString(keyName string) string

GetString

func (*Config) GetStringMap

func (this *Config) GetStringMap(keyName string) map[string]any

GetStringMap

func (*Config) GetStringMapString

func (this *Config) GetStringMapString(keyName string) map[string]string

GetStringMapString

func (*Config) GetStringMapStringSlice

func (this *Config) GetStringMapStringSlice(keyName string) map[string][]string

GetStringMapStringSlice

func (*Config) GetStringSlice

func (this *Config) GetStringSlice(keyName string) []string

GetStringSlice

func (*Config) GetTime

func (this *Config) GetTime(keyName string) time.Time

GetTime

func (*Config) GetUint

func (this *Config) GetUint(keyName string) uint

GetUint

func (*Config) GetUint32

func (this *Config) GetUint32(keyName string) uint32

GetUint32

func (*Config) GetUint64

func (this *Config) GetUint64(keyName string) uint64

GetUint64

func (*Config) IsSet

func (this *Config) IsSet(keyName string) bool

是否设置

func (*Config) OnConfigChange

func (this *Config) OnConfigChange(f func(string)) *Config

事件

func (*Config) Set

func (this *Config) Set(keyName string, value any) *Config

设置

func (*Config) SetDefault

func (this *Config) SetDefault(keyName string, value any) *Config

设置默认值

func (*Config) WithAdapter

func (this *Config) WithAdapter(adapter interfaces.Adapter) *Config

添加适配器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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