database

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterDb

type ClusterDb struct {
	TablePartitionKey string              `json:"name"`
	IndexPartitionKey string              `json:"kind"`
	Region            string              `json:"region"`
	Environment       string              `json:"environment"`
	Status            string              `json:"status"`
	LastUpdatedUnix   int64               `json:"lastUpdatedUnix"`
	Cluster           *registryv1.Cluster `json:"crd"`
}

ClusterDb encapsulates the Cluster CRD

type Db

type Db interface {
	GetCluster(name string) (*registryv1.Cluster, error)
	ListClusters(offset int, limit int, environment string, region string, status string, lastUpdated string) ([]registryv1.Cluster, int, bool, error)
	PutCluster(cluster *registryv1.Cluster) error
	DeleteCluster(name string) error
	Status() error
}

Db provides an interface for interacting with dynamonDb

func NewDb

func NewDb(appConfig *config.AppConfig, m monitoring.MetricsI) Db

NewDb func

Jump to

Keyboard shortcuts

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