Versions in this module Expand all Collapse all v1 v1.0.1 Jul 18, 2022 Changes in this version + type Option func(*option) error + func WithAesEncrypt(key []byte) Option + func WithEnableInclude() Option + func WithEncryptedFileSuffix(suffix string) Option + func WithWatchFileModified(callback func(fsnotify.Event)) Option v1.0.0 Jul 16, 2022 Changes in this version + var S = Shared + var Shared = New() + type AtomicFieldBool struct + func (a *AtomicFieldBool) SetFalse() + func (a *AtomicFieldBool) SetTrue() + func (a *AtomicFieldBool) True() bool + type Config interface + BindPFlags func(p *pflag.FlagSet) error + Get func(key string) interface{} + GetBool func(key string) bool + GetDuration func(key string) time.Duration + GetInt func(key string) int + GetInt64 func(key string) int64 + GetString func(key string) string + GetStringMap func(key string) map[string]interface{} + GetStringMapString func(key string) map[string]string + GetStringSlice func(key string) []string + IsSet func(key string) bool + LoadFromConfigServer func(url, app, profile, label string) (err error) + LoadFromConfigServerWithRawYaml func(url, app, profile, label, key string) (err error) + LoadFromDir func(dirPath string, opts ...SettingsOptFunc) error + LoadFromFile func(entryFile string, opts ...SettingsOptFunc) (err error) + LoadSettings func() + MergeConfig func(in io.Reader) error + ReadConfig func(in io.Reader) error + Set func(key string, val interface{}) + Unmarshal func(obj interface{}) error + UnmarshalKey func(key string, obj interface{}) error + func New() Config + type SettingsOptFunc func(*settingsOpt) error + func WithSettingsAesEncrypt(key []byte) SettingsOptFunc + func WithSettingsEnableInclude() SettingsOptFunc + func WithSettingsEncryptedFileSuffix(suffix string) SettingsOptFunc + func WithSettingsWatchFileModified(callback func(fsnotify.Event)) SettingsOptFunc + type SpringConfigServer struct + RemoteCfg *remoteCfg + func NewSpringConfigServer(url, app, profile, label string) *SpringConfigServer + func (c *SpringConfigServer) Fetch() error + func (c *SpringConfigServer) Get(name string) (interface{}, bool) + func (c *SpringConfigServer) GetBool(name string) (val bool, ok bool) + func (c *SpringConfigServer) GetInt(name string) (val int, ok bool) + func (c *SpringConfigServer) GetString(name string) (string, bool) + func (c *SpringConfigServer) Map(set func(string, interface{})) Other modules containing this package github.com/Laisky/go-config/v2