Versions in this module Expand all Collapse all v0 v0.1.2 Aug 20, 2026 v0.1.1 Aug 15, 2026 v0.1.0 Aug 15, 2026 Changes in this version + const ConfigFormatBool + const ConfigFormatFloat + const ConfigFormatInt + const ConfigFormatJSON + const ConfigFormatText + const ConfigFormatYAML + func Load(dir, env string, out any) error + func LoadENV(path string) error + func LoadYAML(path string, out any) error + func SetEnv(key, value string) error + type ConfigItem struct + Autoload bool + CreatedAt time.Time + Desc string + Format string + ID uint + Key string + Public bool + UpdatedAt time.Time + Value string + func (ConfigItem) TableName() string + type Format int + const FormatAuto + const FormatENV + const FormatYAML + func (f Format) String() string + type Loader struct + func New() *Loader + func (l *Loader) BaseName(name string) *Loader + func (l *Loader) Dir(dir string) *Loader + func (l *Loader) Env(env string) *Loader + func (l *Loader) Format(f Format) *Loader + func (l *Loader) Load(out any) error + func (l *Loader) OverwriteEnvVars(enabled bool) *Loader + func (l *Loader) WithEnvVars(enabled bool) *Loader + type Store struct + func NewEnvOnlyStore() (*Store, error) + func NewStore(opts StoreOptions) (*Store, error) + func NewStoreWithDB(db *gorm.DB) (*Store, error) + func (s *Store) AllConfigs() ([]ConfigItem, error) + func (s *Store) AutoMigrate() error + func (s *Store) CheckValue(key, defaultValue, format string, autoload, public bool) error + func (s *Store) Close() error + func (s *Store) DeleteValue(key string) error + func (s *Store) GetBoolValue(key string) bool + func (s *Store) GetBoolValueWithDefault(key string, defaultVal bool) bool + func (s *Store) GetDurationValue(key string, defaultVal time.Duration) time.Duration + func (s *Store) GetFloatValue(key string, defaultVal float64) float64 + func (s *Store) GetInt64Value(key string, defaultVal int64) int64 + func (s *Store) GetIntValue(key string, defaultVal int) int + func (s *Store) GetStringWithDefault(key, defaultVal string) string + func (s *Store) GetValue(key string) string + func (s *Store) HasDB() bool + func (s *Store) LoadAutoloads() error + func (s *Store) LoadPublicConfigs() ([]ConfigItem, error) + func (s *Store) LookupValue(key string) (string, bool) + func (s *Store) PurgeAllCache() + func (s *Store) PurgeCache(key string) + func (s *Store) SetValue(key, value, format string, autoload, public bool) error + func (s *Store) SetValueSimple(key, value string) error + type StoreOptions struct + Cache cache.Cache[string, []byte] + CacheSize int + CacheTTL time.Duration + DB *gorm.DB