Documentation ¶
Index ¶
- func InitRepositoryProvider(databaseProvider string)
- type ConsoleConfigRepository
- func (c *ConsoleConfigRepository) GetConsoleConfig() (*interfaces.ConsoleConfig, error)
- func (c *ConsoleConfigRepository) IsInitialised() (bool, error)
- func (c *ConsoleConfigRepository) SaveConsoleConfig(config *interfaces.ConsoleConfig) error
- func (c *ConsoleConfigRepository) UpdateConsoleConfig(config *interfaces.ConsoleConfig) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRepositoryProvider ¶
func InitRepositoryProvider(databaseProvider string)
InitRepositoryProvider - One time init for the given DB Provider
Types ¶
type ConsoleConfigRepository ¶
type ConsoleConfigRepository struct {
// contains filtered or unexported fields
}
PostgresCNSIRepository is a PostgreSQL-backed ConsoleConfig repository
func (*ConsoleConfigRepository) GetConsoleConfig ¶
func (c *ConsoleConfigRepository) GetConsoleConfig() (*interfaces.ConsoleConfig, error)
ListByUser - Returns a list of CNSIs registered by a user
func (*ConsoleConfigRepository) IsInitialised ¶
func (c *ConsoleConfigRepository) IsInitialised() (bool, error)
func (*ConsoleConfigRepository) SaveConsoleConfig ¶
func (c *ConsoleConfigRepository) SaveConsoleConfig(config *interfaces.ConsoleConfig) error
Save - Persist a Console setup to a datastore
func (*ConsoleConfigRepository) UpdateConsoleConfig ¶
func (c *ConsoleConfigRepository) UpdateConsoleConfig(config *interfaces.ConsoleConfig) error
type Repository ¶
type Repository interface { GetConsoleConfig() (*interfaces.ConsoleConfig, error) SaveConsoleConfig(config *interfaces.ConsoleConfig) error UpdateConsoleConfig(config *interfaces.ConsoleConfig) error IsInitialised() (bool, error) }
func NewPostgresConsoleConfigRepository ¶
func NewPostgresConsoleConfigRepository(dcp *sql.DB) (Repository, error)
NewPostgresConsoleConfigRepository will create a new instance of the PostgresConsoleConfigRepository
Click to show internal directories.
Click to hide internal directories.