Documentation ¶
Index ¶
- Constants
- func EmitMetrics(ctx context.Context, log *logrus.Entry, dbOpenShiftClusters OpenShiftClusters, ...)
- func Name(isLocalDevelopmentMode bool) (string, error)
- 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, _env env.Core, msiAuthorizer autorest.Authorizer) (cosmosdb.Authorizer, error)
- type AsyncOperations
- type Billing
- type Monitors
- type OpenShiftClusters
- 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 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.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 ¶
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) }
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 ¶
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 ¶
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 ¶
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, func(*api.OpenShiftClusterDocument) error) (*api.OpenShiftClusterDocument, error) PatchWithLease(context.Context, string, func(*api.OpenShiftClusterDocument) error) (*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) }
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 ¶
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) }
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 ¶
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, isLocalDevelopmentMode bool, dbc cosmosdb.DatabaseClient) (Subscriptions, error)
NewSubscriptions returns a new Subscriptions
func NewSubscriptionsWithProvidedClient ¶
func NewSubscriptionsWithProvidedClient(client cosmosdb.SubscriptionDocumentClient) Subscriptions
Source Files ¶
Click to show internal directories.
Click to hide internal directories.