Documentation ¶
Index ¶
Constants ¶
View Source
const (
ClientInstanceKey = `SQLClient`
)
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect sets up the database connection and creates tables.
Connection is of type interface{} - this allows for tests to pass in a sqlmock connection and for main to connect given a connection string.
func Connection ¶
Connection returns the driver and connection string to the DB.
Types ¶
type Client ¶
type Client interface { CreateKubernetesProvider(kubernetes.Provider) error CreateKubernetesResource(kubernetes.Resource) error DeleteKubernetesProvider(string) error GetKubernetesProvider(string) (kubernetes.Provider, error) GetKubernetesProviderAndPermissions(string) (kubernetes.Provider, error) ListKubernetesAccountsBySpinnakerApp(string) ([]string, error) ListKubernetesClustersByApplication(string) ([]kubernetes.Resource, error) ListKubernetesClustersByFields(...string) ([]kubernetes.Resource, error) ListKubernetesProviders() ([]kubernetes.Provider, error) ListKubernetesProvidersAndPermissions() ([]kubernetes.Provider, error) ListKubernetesResourcesByFields(...string) ([]kubernetes.Resource, error) ListKubernetesResourcesByTaskID(string) ([]kubernetes.Resource, error) ListKubernetesResourceNamesByAccountNameAndKindAndNamespace(string, string, string) ([]string, error) ListReadGroupsByAccountName(string) ([]string, error) ListWriteGroupsByAccountName(string) ([]string, error) }
Click to show internal directories.
Click to hide internal directories.