Documentation
¶
Index ¶
- func AddWatch(event func(e fsnotify.Event))
- func All() map[string]any
- func GenerateConfig() ([]byte, error)
- func Get(path string, defaultValue ...any) string
- func GetBool(path string, defaultValue ...any) bool
- func GetFloat64(path string, defaultValue ...any) float64
- func GetInt(path string, defaultValue ...any) int
- func GetInt64(path string, defaultValue ...any) int64
- func GetIntSlice(path string) []int
- func GetString(path string, defaultValue ...any) string
- func GetStringMapString(path string) map[string]string
- func GetStringSlice(path string) []string
- func GetUint(path string, defaultValue ...any) uint
- func IsSet(path string) bool
- func OpenConfigChangeEvent()
- func Set(path string, value any)
- type ExclusivePreferences
- func (itself *ExclusivePreferences) Get(path string, defaultValue ...any) string
- func (itself *ExclusivePreferences) GetBool(path string, defaultValue ...any) bool
- func (itself *ExclusivePreferences) GetFloat64(path string, defaultValue ...any) float64
- func (itself *ExclusivePreferences) GetInt(path string, defaultValue ...any) int
- func (itself *ExclusivePreferences) GetInt64(path string, defaultValue ...any) int64
- func (itself *ExclusivePreferences) GetString(path string, defaultValue ...any) string
- func (itself *ExclusivePreferences) GetStringMapString(path string) map[string]string
- func (itself *ExclusivePreferences) GetUint(path string, defaultValue ...any) uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfig ¶ added in v0.0.4
func GetFloat64 ¶
GetFloat64 returns a float64 setting.
func GetStringMapString ¶
GetStringMapString returns a string map setting.
func GetStringSlice ¶
GetStringSlice returns a string slice setting.
Types ¶
type ExclusivePreferences ¶
type ExclusivePreferences struct {
// contains filtered or unexported fields
}
ExclusivePreferences reads settings below a fixed root path.
func GetExclusivePreferences ¶
func GetExclusivePreferences(prefix string) ExclusivePreferences
GetExclusivePreferences returns a namespaced preferences reader.
func (*ExclusivePreferences) Get ¶
func (itself *ExclusivePreferences) Get(path string, defaultValue ...any) string
Get returns a string setting below the namespace.
func (*ExclusivePreferences) GetBool ¶
func (itself *ExclusivePreferences) GetBool(path string, defaultValue ...any) bool
GetBool returns a bool setting below the namespace.
func (*ExclusivePreferences) GetFloat64 ¶
func (itself *ExclusivePreferences) GetFloat64(path string, defaultValue ...any) float64
GetFloat64 returns a float64 setting below the namespace.
func (*ExclusivePreferences) GetInt ¶
func (itself *ExclusivePreferences) GetInt(path string, defaultValue ...any) int
GetInt returns an int setting below the namespace.
func (*ExclusivePreferences) GetInt64 ¶
func (itself *ExclusivePreferences) GetInt64(path string, defaultValue ...any) int64
GetInt64 returns an int64 setting below the namespace.
func (*ExclusivePreferences) GetString ¶
func (itself *ExclusivePreferences) GetString(path string, defaultValue ...any) string
GetString returns a string setting below the namespace.
func (*ExclusivePreferences) GetStringMapString ¶
func (itself *ExclusivePreferences) GetStringMapString(path string) map[string]string
GetStringMapString returns a string map setting below the namespace.