configuration

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedVaultConfigurationProvider

type CachedVaultConfigurationProvider struct {
}

func (CachedVaultConfigurationProvider) Clear

func (CachedVaultConfigurationProvider) Get

func (ev CachedVaultConfigurationProvider) Get(key string) interface{}

func (CachedVaultConfigurationProvider) UpsertKey

func (ev CachedVaultConfigurationProvider) UpsertKey(key string, value interface{}) error

func (CachedVaultConfigurationProvider) UpsertKeys

func (ev CachedVaultConfigurationProvider) UpsertKeys(values map[string]interface{}) []error

type ConfigurationProvider

type ConfigurationProvider interface {
	UpsertKey(key string, value interface{}) error
	UpsertKeys(values map[string]interface{}) []error
	Get(key string) interface{}
	Clear(key string)
}

type ConfigurationService

type ConfigurationService struct {
	Providers []ConfigurationProvider
}

func Get

func Get() *ConfigurationService

func New

func New() *ConfigurationService

func NewWithDefaults

func NewWithDefaults() *ConfigurationService

func (*ConfigurationService) Clear

func (c *ConfigurationService) Clear(key string)

func (*ConfigurationService) Get

func (c *ConfigurationService) Get(key string) interface{}

func (*ConfigurationService) GetBase64

func (c *ConfigurationService) GetBase64(key string) string

func (*ConfigurationService) GetBool

func (c *ConfigurationService) GetBool(key string) bool

func (*ConfigurationService) GetFloat

func (c *ConfigurationService) GetFloat(key string) float64

func (*ConfigurationService) GetInt

func (c *ConfigurationService) GetInt(key string) int

func (*ConfigurationService) GetString

func (c *ConfigurationService) GetString(key string) string

func (*ConfigurationService) LoadFromFile

func (c *ConfigurationService) LoadFromFile(path string)

func (*ConfigurationService) RegisterDefaults

func (c *ConfigurationService) RegisterDefaults() *ConfigurationService

func (*ConfigurationService) RegisterProvider

func (c *ConfigurationService) RegisterProvider(providers ...ConfigurationProvider)

func (*ConfigurationService) UpsertKey

func (c *ConfigurationService) UpsertKey(key string, value interface{}) error

func (*ConfigurationService) UpsertKeys

func (c *ConfigurationService) UpsertKeys(values map[string]interface{}) []error

type EnvironmentConfigurationProvider

type EnvironmentConfigurationProvider struct {
}

func (EnvironmentConfigurationProvider) Clear

func (EnvironmentConfigurationProvider) Get

func (ev EnvironmentConfigurationProvider) Get(key string) interface{}

func (EnvironmentConfigurationProvider) UpsertKey

func (ev EnvironmentConfigurationProvider) UpsertKey(key string, value interface{}) error

func (EnvironmentConfigurationProvider) UpsertKeys

func (ev EnvironmentConfigurationProvider) UpsertKeys(values map[string]interface{}) []error

type RedisConfigurationProvider added in v0.0.36

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

func NewRedisConfigurationProvider added in v0.0.36

func NewRedisConfigurationProvider(connString string) *RedisConfigurationProvider

func (RedisConfigurationProvider) Clear added in v0.0.36

func (ev RedisConfigurationProvider) Clear(key string)

func (RedisConfigurationProvider) Get added in v0.0.36

func (ev RedisConfigurationProvider) Get(key string) interface{}

func (RedisConfigurationProvider) UpsertKey added in v0.0.36

func (ev RedisConfigurationProvider) UpsertKey(key string, value interface{}) error

func (RedisConfigurationProvider) UpsertKeys added in v0.0.36

func (ev RedisConfigurationProvider) UpsertKeys(values map[string]interface{}) []error

Jump to

Keyboard shortcuts

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