database

package
v0.0.0-...-823d357 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

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 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.Interface)

func Name

func Name(isLocalDevelopmentMode bool) (string, error)

func NewDatabaseClient

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

func NewJSONHandle

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

func NewMasterKeyAuthorizer

func NewMasterKeyAuthorizer(ctx context.Context, _env env.Core, msiAuthorizer autorest.Authorizer) (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) (AsyncOperations, error)

NewAsyncOperations returns a new AsyncOperations

func NewAsyncOperationsWithProvidedClient

func NewAsyncOperationsWithProvidedClient(client cosmosdb.AsyncOperationDocumentClient) AsyncOperations

type Billing

Billing is the database interface for BillingDocuments

func NewBilling

func NewBilling(ctx context.Context, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient) (Billing, error)

NewBilling returns a new Billing

func NewBillingWithProvidedClient

func NewBillingWithProvidedClient(client cosmosdb.BillingDocumentClient) Billing

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, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient) (Monitors, error)

NewMonitors returns a new Monitors

type OpenShiftClusters

OpenShiftClusters is the database interface for OpenShiftClusterDocuments

func NewOpenShiftClusters

func NewOpenShiftClusters(ctx context.Context, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient) (OpenShiftClusters, error)

NewOpenShiftClusters returns a new OpenShiftClusters

func NewOpenShiftClustersWithProvidedClient

func NewOpenShiftClustersWithProvidedClient(client cosmosdb.OpenShiftClusterDocumentClient, collectionClient cosmosdb.CollectionClient) OpenShiftClusters

type Portal

Portal is the database interface for PortalDocuments

func NewPortal

func NewPortal(ctx context.Context, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient) (Portal, error)

NewPortal returns a new Portal

func NewPortalWithProvidedClient

func NewPortalWithProvidedClient(client cosmosdb.PortalDocumentClient) Portal

type Subscriptions

Subscriptions is the database interface for SubscriptionDocuments

func NewSubscriptions

func NewSubscriptions(ctx context.Context, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient) (Subscriptions, error)

NewSubscriptions returns a new Subscriptions

func NewSubscriptionsWithProvidedClient

func NewSubscriptionsWithProvidedClient(client cosmosdb.SubscriptionDocumentClient) Subscriptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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