database

package
v0.0.0-...-ed9f9c9 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 33

Documentation

Index

Constants

View Source
const (
	OpenShiftClustersDequeueQuery       = `` /* 207-byte string literal not displayed */
	OpenShiftClustersQueueLengthQuery   = `` /* 220-byte string literal not displayed */
	OpenShiftClustersGetQuery           = `SELECT * FROM OpenShiftClusters doc WHERE doc.key = @key`
	OpenshiftClustersPrefixQuery        = `SELECT * FROM OpenShiftClusters doc WHERE STARTSWITH(doc.key, @prefix)`
	OpenshiftClustersClientIdQuery      = `SELECT * FROM OpenShiftClusters doc WHERE doc.clientIdKey = @clientID`
	OpenshiftClustersResourceGroupQuery = `SELECT * FROM OpenShiftClusters doc WHERE doc.clusterResourceGroupIdKey = @resourceGroupID`
)
View Source
const (
	ClusterManagerConfigurationsGetQuery = `SELECT * FROM ClusterManagerConfigurations doc WHERE doc.key = @key`
)
View Source
const (
	SubscriptionsDequeueQuery string = `SELECT * FROM Subscriptions doc WHERE (doc.deleting ?? false) AND (doc.leaseExpires ?? 0) < GetCurrentTimestamp() / 1000`
)

Variables

This section is empty.

Functions

func EmitMetrics

func EmitMetrics(ctx context.Context, log *logrus.Entry, dbOpenShiftClusters OpenShiftClusters, m metrics.Emitter)

func NewDatabaseClient

func NewDatabaseClient(log *logrus.Entry, _env env.Core, authorizer cosmosdb.Authorizer, m metrics.Emitter, aead encryption.AEAD, databaseAccountName string) (cosmosdb.DatabaseClient, error)

func NewDatabaseClientFromEnv

func NewDatabaseClientFromEnv(ctx context.Context, _env env.Core, log *logrus.Entry, m metrics.Emitter, aead encryption.AEAD) (cosmosdb.DatabaseClient, error)

NewDatabaseClient creates a CosmosDB database client from the environment configuration.

func NewJSONHandle

func NewJSONHandle(aead encryption.AEAD) (*codec.JsonHandle, error)

func NewTokenAuthorizer

func NewTokenAuthorizer(ctx context.Context, log *logrus.Entry, cred azcore.TokenCredential, databaseAccountName string, scopes []string) (cosmosdb.Authorizer, error)

Types

type AsyncOperations

AsyncOperations is the database interface for AsyncOperationDocuments

func NewAsyncOperations

func NewAsyncOperations(ctx context.Context, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient, dbName string) (AsyncOperations, error)

NewAsyncOperations returns a new AsyncOperations

func NewAsyncOperationsWithProvidedClient

func NewAsyncOperationsWithProvidedClient(client cosmosdb.AsyncOperationDocumentClient, uuidGenerator uuid.Generator) AsyncOperations

type Billing

Billing is the database interface for BillingDocuments

func NewBilling

func NewBilling(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (Billing, error)

NewBilling returns a new Billing

func NewBillingWithProvidedClient

func NewBillingWithProvidedClient(client cosmosdb.BillingDocumentClient) Billing

type DatabaseGroupWithAsyncOperations

type DatabaseGroupWithAsyncOperations interface {
	AsyncOperations() (AsyncOperations, error)
}

type DatabaseGroupWithBilling

type DatabaseGroupWithBilling interface {
	Billing() (Billing, error)
}

type DatabaseGroupWithMonitors

type DatabaseGroupWithMonitors interface {
	Monitors() (Monitors, error)
}

type DatabaseGroupWithOpenShiftClusters

type DatabaseGroupWithOpenShiftClusters interface {
	OpenShiftClusters() (OpenShiftClusters, error)
}

type DatabaseGroupWithOpenShiftVersions

type DatabaseGroupWithOpenShiftVersions interface {
	OpenShiftVersions() (OpenShiftVersions, error)
}

type DatabaseGroupWithPlatformWorkloadIdentityRoleSets

type DatabaseGroupWithPlatformWorkloadIdentityRoleSets interface {
	PlatformWorkloadIdentityRoleSets() (PlatformWorkloadIdentityRoleSets, error)
}

type DatabaseGroupWithPortal

type DatabaseGroupWithPortal interface {
	Portal() (Portal, error)
}

type DatabaseGroupWithSubscriptions

type DatabaseGroupWithSubscriptions interface {
	Subscriptions() (Subscriptions, error)
}

type Gateway

func NewGateway

func NewGateway(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (Gateway, error)

func NewGatewayWithProvidedClient

func NewGatewayWithProvidedClient(client cosmosdb.GatewayDocumentClient, uuidGenerator uuid.Generator) Gateway

type Monitors

type Monitors interface {
	Create(context.Context, *api.MonitorDocument) (*api.MonitorDocument, error)
	PatchWithLease(context.Context, string, func(*api.MonitorDocument) error) (*api.MonitorDocument, error)
	TryLease(context.Context) (*api.MonitorDocument, error)
	ListBuckets(context.Context) ([]int, error)
	ListMonitors(context.Context) (*api.MonitorDocuments, error)
	MonitorHeartbeat(context.Context) error
}

Monitors is the database interface for MonitorDocuments

func NewMonitors

func NewMonitors(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (Monitors, error)

NewMonitors returns a new Monitors

type OpenShiftClusterDocumentMutator

type OpenShiftClusterDocumentMutator func(*api.OpenShiftClusterDocument) error

type OpenShiftClusters

OpenShiftClusters is the database interface for OpenShiftClusterDocuments

func NewOpenShiftClusters

func NewOpenShiftClusters(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (OpenShiftClusters, error)

NewOpenShiftClusters returns a new OpenShiftClusters

func NewOpenShiftClustersWithProvidedClient

func NewOpenShiftClustersWithProvidedClient(client cosmosdb.OpenShiftClusterDocumentClient, collectionClient cosmosdb.CollectionClient, uuid string, uuidGenerator uuid.Generator) OpenShiftClusters

type Portal

Portal is the database interface for PortalDocuments

func NewPortal

func NewPortal(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (Portal, error)

NewPortal returns a new Portal

func NewPortalWithProvidedClient

func NewPortalWithProvidedClient(client cosmosdb.PortalDocumentClient, uuidGenerator uuid.Generator) Portal

type Subscriptions

Subscriptions is the database interface for SubscriptionDocuments

func NewSubscriptions

func NewSubscriptions(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (Subscriptions, error)

NewSubscriptions returns a new Subscriptions

func NewSubscriptionsWithProvidedClient

func NewSubscriptionsWithProvidedClient(client cosmosdb.SubscriptionDocumentClient, uuid string) Subscriptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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