account

package
v0.0.0-...-67ec6ba Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureCosmosDBManager

type AzureCosmosDBManager struct {
	Creds        config.Credentials
	SecretClient secrets.SecretClient
}

AzureCosmosDBManager is the struct which contains helper functions for resource groups

func NewAzureCosmosDBManager

func NewAzureCosmosDBManager(creds config.Credentials, secretClient secrets.SecretClient) *AzureCosmosDBManager

NewAzureCosmosDBManager creates a new cosmos db client

func (*AzureCosmosDBManager) CheckNameExistsCosmosDB

func (m *AzureCosmosDBManager) CheckNameExistsCosmosDB(
	ctx context.Context,
	accountName string) (bool, error)

CheckNameExistsCosmosDB checks if the global account name already exists

func (*AzureCosmosDBManager) CreateOrUpdateCosmosDB

func (m *AzureCosmosDBManager) CreateOrUpdateCosmosDB(
	ctx context.Context,
	accountName string,
	spec v1alpha1.CosmosDBSpec,
	tags map[string]*string) (*documentdb.DatabaseAccountGetResults, string, error)

CreateOrUpdateCosmosDB creates a new CosmosDB

func (*AzureCosmosDBManager) Delete

Delete drops cosmosdb

func (*AzureCosmosDBManager) DeleteCosmosDB

func (m *AzureCosmosDBManager) DeleteCosmosDB(
	ctx context.Context,
	groupName string,
	cosmosDBName string) (*autorest.Response, error)

DeleteCosmosDB removes the resource group named by env var

func (*AzureCosmosDBManager) Ensure

Ensure ensures that cosmosdb is provisioned as specified

func (*AzureCosmosDBManager) GetCosmosDB

func (m *AzureCosmosDBManager) GetCosmosDB(
	ctx context.Context,
	groupName string,
	cosmosDBName string) (*documentdb.DatabaseAccountGetResults, error)

GetCosmosDB gets the cosmos db account

func (*AzureCosmosDBManager) GetParents

GetParents returns the parents of cosmosdb

func (*AzureCosmosDBManager) GetStatus

GetStatus gets the ASOStatus

func (*AzureCosmosDBManager) ListConnectionStrings

func (m *AzureCosmosDBManager) ListConnectionStrings(
	ctx context.Context,
	groupName string,
	accountName string) (*documentdb.DatabaseAccountListConnectionStringsResult, error)

ListConnectionStrings lists the connection strings for a database account

func (*AzureCosmosDBManager) ListKeys

func (m *AzureCosmosDBManager) ListKeys(
	ctx context.Context,
	groupName string,
	accountName string) (*documentdb.DatabaseAccountListKeysResult, error)

ListKeys lists the read & write keys for a database account

type CosmosDBManager

type CosmosDBManager interface {
	// CreateOrUpdateCosmosDB creates a new cosmos database account
	CreateOrUpdateCosmosDB(ctx context.Context, cosmosDBName string, spec v1alpha1.CosmosDBSpec, tags map[string]*string) (*documentdb.DatabaseAccountGetProperties, string, error)

	// GetCosmosDB gets a cosmos database account
	GetCosmosDB(ctx context.Context, groupName string, cosmosDBName string) (*documentdb.DatabaseAccountGetProperties, error)

	// DeleteCosmosDB removes the cosmos database account
	DeleteCosmosDB(ctx context.Context, groupName string, cosmosDBName string) (*autorest.Response, error)

	// CheckNameExistsCosmosDB check if the account name already exists globally
	CheckNameExistsCosmosDB(ctx context.Context, accountName string) (bool, error)

	// ListKeys lists the read & write keys for a database account
	ListKeys(ctx context.Context, groupName string, accountName string) (*documentdb.DatabaseAccountListKeysResult, error)

	// ListConnectionStrings lists the connection strings for a database account
	ListConnectionStrings(ctx context.Context, groupName string, accountName string) (*documentdb.DatabaseAccountListConnectionStringsResult, error)

	resourcemanager.ARMClient
}

CosmosDBManager client functions

Jump to

Keyboard shortcuts

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