console_config

package
Version: v2.0.0-beta-001+incomp... Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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