Documentation
¶
Index ¶
- Constants
- func EmitMetrics(ctx context.Context, log *logrus.Entry, dbOpenShiftClusters OpenShiftClusters, ...)
- func NewDatabaseClient(log *logrus.Entry, _env env.Core, authorizer cosmosdb.Authorizer, ...) (cosmosdb.DatabaseClient, error)
- func NewJSONHandle(aead encryption.AEAD) (*codec.JsonHandle, error)
- func NewMasterKeyAuthorizer(ctx context.Context, token azcore.TokenCredential, ...) (cosmosdb.Authorizer, error)
- type AsyncOperations
- type Billing
- type ClusterManagerConfigurations
- type Gateway
- type Monitors
- type OpenShiftClusterDocumentMutator
- type OpenShiftClusters
- type OpenShiftVersions
- type Portal
- type Subscriptions
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 NewDatabaseClient ¶
func NewDatabaseClient(log *logrus.Entry, _env env.Core, authorizer cosmosdb.Authorizer, m metrics.Emitter, aead encryption.AEAD, databaseAccountName string) (cosmosdb.DatabaseClient, error)
func NewJSONHandle ¶
func NewJSONHandle(aead encryption.AEAD) (*codec.JsonHandle, error)
func NewMasterKeyAuthorizer ¶
func NewMasterKeyAuthorizer(ctx context.Context, token azcore.TokenCredential, clientOptions *policy.ClientOptions, subscriptionID, resourceGroup, databaseAccountName string) (cosmosdb.Authorizer, error)
Types ¶
type AsyncOperations ¶
type AsyncOperations interface { Create(context.Context, *api.AsyncOperationDocument) (*api.AsyncOperationDocument, error) Get(context.Context, string) (*api.AsyncOperationDocument, error) Patch(context.Context, string, func(*api.AsyncOperationDocument) error) (*api.AsyncOperationDocument, error) NewUUID() string }
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 ¶
type Billing interface { Create(context.Context, *api.BillingDocument) (*api.BillingDocument, error) Get(context.Context, string) (*api.BillingDocument, error) MarkForDeletion(context.Context, string) (*api.BillingDocument, error) UpdateLastBillingTimestamp(context.Context, string, int) (*api.BillingDocument, error) List(string) cosmosdb.BillingDocumentIterator ListAll(context.Context) (*api.BillingDocuments, error) Delete(context.Context, *api.BillingDocument) error }
Billing is the database interface for BillingDocuments
func NewBilling ¶
NewBilling returns a new Billing
func NewBillingWithProvidedClient ¶
func NewBillingWithProvidedClient(client cosmosdb.BillingDocumentClient) Billing
type ClusterManagerConfigurations ¶
type ClusterManagerConfigurations interface { Create(context.Context, *api.ClusterManagerConfigurationDocument) (*api.ClusterManagerConfigurationDocument, error) Get(context.Context, string) (*api.ClusterManagerConfigurationDocument, error) Update(context.Context, *api.ClusterManagerConfigurationDocument) (*api.ClusterManagerConfigurationDocument, error) Delete(context.Context, *api.ClusterManagerConfigurationDocument) error ChangeFeed() cosmosdb.ClusterManagerConfigurationDocumentIterator NewUUID() string }
func NewClusterManagerConfigurations ¶
func NewClusterManagerConfigurations(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (ClusterManagerConfigurations, error)
func NewClusterManagerConfigurationsWithProvidedClient ¶
func NewClusterManagerConfigurationsWithProvidedClient(client cosmosdb.ClusterManagerConfigurationDocumentClient, collectionClient cosmosdb.CollectionClient, uuid string, uuidGenerator uuid.Generator) ClusterManagerConfigurations
type Gateway ¶
type Gateway interface { ChangeFeed() cosmosdb.GatewayDocumentIterator Create(context.Context, *api.GatewayDocument) (*api.GatewayDocument, error) Delete(context.Context, *api.GatewayDocument) error Get(context.Context, string) (*api.GatewayDocument, error) Patch(context.Context, string, func(*api.GatewayDocument) error) (*api.GatewayDocument, error) NewUUID() string }
func NewGateway ¶
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 ¶
NewMonitors returns a new Monitors
type OpenShiftClusterDocumentMutator ¶
type OpenShiftClusterDocumentMutator func(*api.OpenShiftClusterDocument) error
type OpenShiftClusters ¶
type OpenShiftClusters interface { Create(context.Context, *api.OpenShiftClusterDocument) (*api.OpenShiftClusterDocument, error) Get(context.Context, string) (*api.OpenShiftClusterDocument, error) QueueLength(context.Context, string) (int, error) Patch(context.Context, string, OpenShiftClusterDocumentMutator) (*api.OpenShiftClusterDocument, error) PatchWithLease(context.Context, string, OpenShiftClusterDocumentMutator) (*api.OpenShiftClusterDocument, error) Update(context.Context, *api.OpenShiftClusterDocument) (*api.OpenShiftClusterDocument, error) Delete(context.Context, *api.OpenShiftClusterDocument) error ChangeFeed() cosmosdb.OpenShiftClusterDocumentIterator List(string) cosmosdb.OpenShiftClusterDocumentIterator ListAll(context.Context) (*api.OpenShiftClusterDocuments, error) ListByPrefix(string, string, string) (cosmosdb.OpenShiftClusterDocumentIterator, error) Dequeue(context.Context) (*api.OpenShiftClusterDocument, error) Lease(context.Context, string) (*api.OpenShiftClusterDocument, error) EndLease(context.Context, string, api.ProvisioningState, api.ProvisioningState, *string) (*api.OpenShiftClusterDocument, error) GetByClientID(ctx context.Context, partitionKey, clientID string) (*api.OpenShiftClusterDocuments, error) GetByClusterResourceGroupID(ctx context.Context, partitionKey, resourceGroupID string) (*api.OpenShiftClusterDocuments, error) NewUUID() string }
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 OpenShiftVersions ¶
type OpenShiftVersions interface { ChangeFeed() cosmosdb.OpenShiftVersionDocumentIterator Create(context.Context, *api.OpenShiftVersionDocument) (*api.OpenShiftVersionDocument, error) Delete(context.Context, *api.OpenShiftVersionDocument) error Get(context.Context, string) (*api.OpenShiftVersionDocument, error) Update(context.Context, *api.OpenShiftVersionDocument) (*api.OpenShiftVersionDocument, error) Patch(context.Context, string, func(*api.OpenShiftVersionDocument) error) (*api.OpenShiftVersionDocument, error) ListAll(context.Context) (*api.OpenShiftVersionDocuments, error) NewUUID() string }
func NewOpenShiftVersions ¶
func NewOpenShiftVersions(ctx context.Context, dbc cosmosdb.DatabaseClient, dbName string) (OpenShiftVersions, error)
func NewOpenShiftVersionsWithProvidedClient ¶
func NewOpenShiftVersionsWithProvidedClient(client cosmosdb.OpenShiftVersionDocumentClient, uuid uuid.Generator) OpenShiftVersions
type Portal ¶
type Portal interface { Create(context.Context, *api.PortalDocument) (*api.PortalDocument, error) Get(context.Context, string) (*api.PortalDocument, error) Patch(context.Context, string, func(*api.PortalDocument) error) (*api.PortalDocument, error) NewUUID() string }
Portal is the database interface for PortalDocuments
func NewPortalWithProvidedClient ¶
func NewPortalWithProvidedClient(client cosmosdb.PortalDocumentClient, uuidGenerator uuid.Generator) Portal
type Subscriptions ¶
type Subscriptions interface { Create(context.Context, *api.SubscriptionDocument) (*api.SubscriptionDocument, error) Get(context.Context, string) (*api.SubscriptionDocument, error) Update(context.Context, *api.SubscriptionDocument) (*api.SubscriptionDocument, error) ChangeFeed() cosmosdb.SubscriptionDocumentIterator Dequeue(context.Context) (*api.SubscriptionDocument, error) Lease(context.Context, string) (*api.SubscriptionDocument, error) EndLease(context.Context, string, bool, bool) (*api.SubscriptionDocument, error) }
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.