Documentation ¶
Index ¶
- func ConfigLookup(name string) (string, bool)
- func InitRepositoryProvider(databaseProvider string)
- func InitializeConfEnvProvider(configStore Repository) error
- func MigrateSetupData(portal interfaces.PortalProxy, configStore Repository) error
- type ConsoleConfigRepository
- func (c *ConsoleConfigRepository) DeleteConsoleConfig() error
- func (c *ConsoleConfigRepository) DeleteValue(group, key string) error
- func (c *ConsoleConfigRepository) GetConsoleConfig() (*interfaces.ConsoleConfig, error)
- func (c *ConsoleConfigRepository) GetValue(group, key string) (string, bool, error)
- func (c *ConsoleConfigRepository) GetValues(group string) (map[string]string, error)
- func (c *ConsoleConfigRepository) SetValue(group, name, value string) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigLookup ¶
ConfigLookup looks up env var from the config database
func InitRepositoryProvider ¶
func InitRepositoryProvider(databaseProvider string)
InitRepositoryProvider - One time init for the given DB Provider
func InitializeConfEnvProvider ¶
func InitializeConfEnvProvider(configStore Repository) error
InitializeConfEnvProvider reads the config from the database
func MigrateSetupData ¶
func MigrateSetupData(portal interfaces.PortalProxy, configStore Repository) error
MigrateSetupData will migrate the old data if needed
Types ¶
type ConsoleConfigRepository ¶
type ConsoleConfigRepository struct {
// contains filtered or unexported fields
}
PostgresCNSIRepository is a PostgreSQL-backed ConsoleConfig repository
func (*ConsoleConfigRepository) DeleteConsoleConfig ¶
func (c *ConsoleConfigRepository) DeleteConsoleConfig() error
DeleteConsoleConfig will delete all row(s) from the legacy config_config table
func (*ConsoleConfigRepository) DeleteValue ¶
func (c *ConsoleConfigRepository) DeleteValue(group, key string) error
DeleteValue deletes a value from the config table
func (*ConsoleConfigRepository) GetConsoleConfig ¶
func (c *ConsoleConfigRepository) GetConsoleConfig() (*interfaces.ConsoleConfig, error)
func (*ConsoleConfigRepository) GetValue ¶
func (c *ConsoleConfigRepository) GetValue(group, key string) (string, bool, error)
GetValue will try and get the config value for the specified key
func (*ConsoleConfigRepository) GetValues ¶
func (c *ConsoleConfigRepository) GetValues(group string) (map[string]string, error)
GetValues returns all values from the config table as a map
func (*ConsoleConfigRepository) SetValue ¶
func (c *ConsoleConfigRepository) SetValue(group, name, value string) error
type Repository ¶
type Repository interface { GetConsoleConfig() (*interfaces.ConsoleConfig, error) DeleteConsoleConfig() error // Access to the config data GetValue(group, name string) (string, bool, error) SetValue(group, name, value string) error DeleteValue(group, name string) error GetValues(group string) (map[string]string, error) }
func NewPostgresConsoleConfigRepository ¶
func NewPostgresConsoleConfigRepository(dcp *sql.DB) (Repository, error)
NewPostgresConsoleConfigRepository will create a new instance of the PostgresConsoleConfigRepository