database

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const FieldPrefix = "crd.spec."

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)
	ListClustersWithFilter(offset int, limit int, filter *DynamoDBFilter) ([]registryv1.Cluster, int, bool, error)
	PutCluster(cluster *registryv1.Cluster) error
	DeleteCluster(name string) error
	Status() error
	Mock() *dynamock.DynaMock
	ListClustersWithService(serviceId string, offset int, limit int, environment string, region string, status string, lastUpdated string) ([]registryv1.Cluster, int, bool, error)
	ListClustersWithServiceAndFilter(serviceId string, offset int, limit int, filter *DynamoDBFilter) ([]registryv1.Cluster, int, bool, error)
	GetClusterWithService(serviceId string, clusterName string) (*registryv1.Cluster, error)
}

Db provides an interface for interacting with dynamoDb

func NewDb

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

NewDb func

type DynamoDBFilter added in v1.3.0

type DynamoDBFilter struct {
	// contains filtered or unexported fields
}

func NewDynamoDBFilter added in v1.3.0

func NewDynamoDBFilter() *DynamoDBFilter

func (*DynamoDBFilter) AddCondition added in v1.3.0

func (f *DynamoDBFilter) AddCondition(condition *models.FilterCondition) *DynamoDBFilter

func (*DynamoDBFilter) Build added in v1.3.0

Jump to

Keyboard shortcuts

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