azuresqldb

package
v0.0.0-...-08b58c2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureSqlDbManager

type AzureSqlDbManager struct {
	// contains filtered or unexported fields
}

func NewAzureSqlDbManager

func NewAzureSqlDbManager(creds config.Credentials) *AzureSqlDbManager

func (*AzureSqlDbManager) AddLongTermRetention

func (m *AzureSqlDbManager) AddLongTermRetention(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	databaseName string,
	policy azuresqlshared.SQLDatabaseBackupLongTermRetentionPolicy) (*sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture, error)

AddLongTermRetention enables / disables long term retention

func (*AzureSqlDbManager) AddShortTermRetention

func (m *AzureSqlDbManager) AddShortTermRetention(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	databaseName string,
	policy *v1beta1.SQLDatabaseShortTermRetentionPolicy) (*sql.BackupShortTermRetentionPoliciesCreateOrUpdateFuture, error)

func (*AzureSqlDbManager) CreateOrUpdateDB

func (m *AzureSqlDbManager) CreateOrUpdateDB(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	location string,
	serverName string,
	tags map[string]*string,
	properties azuresqlshared.SQLDatabaseProperties) (string, *sql.Database, error)

CreateOrUpdateDB creates or updates a DB in Azure

func (*AzureSqlDbManager) Delete

Delete drops a AzureSqlDb

func (*AzureSqlDbManager) DeleteDB

func (m *AzureSqlDbManager) DeleteDB(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	databaseName string) (future *sql.DatabasesDeleteFuture, err error)

DeleteDB deletes a DB

func (*AzureSqlDbManager) Ensure

Ensure creates an AzureSqlDb

func (*AzureSqlDbManager) GetDB

func (m *AzureSqlDbManager) GetDB(ctx context.Context, subscriptionID string, resourceGroupName string, serverName string, databaseName string) (sql.Database, error)

GetDB retrieves a database

func (*AzureSqlDbManager) GetParents

GetParents returns the parents of AzureSqlDatabase

func (*AzureSqlDbManager) GetServer

func (m *AzureSqlDbManager) GetServer(ctx context.Context, subscriptionID string, resourceGroupName string, serverName string) (result sql.Server, err error)

GetServer returns a SQL server

func (*AzureSqlDbManager) GetStatus

type SqlDbManager

type SqlDbManager interface {
	CreateOrUpdateDB(ctx context.Context,
		subscriptionID string,
		resourceGroupName string,
		location string,
		serverName string,
		tags map[string]*string,
		properties azuresqlshared.SQLDatabaseProperties) (pollingUrl string, db *sql.Database, err error)

	DeleteDB(ctx context.Context,
		subscriptionID string,
		resourceGroupName string,
		serverName string,
		databaseName string) (future *sql.DatabasesDeleteFuture, err error)

	GetDB(ctx context.Context,
		subscriptionID string,
		resourceGroupName string,
		serverName string, databaseName string) (sql.Database, error)

	GetServer(ctx context.Context,
		subscriptionID string,
		resourceGroupName string,
		serverName string) (result sql.Server, err error)

	AddLongTermRetention(ctx context.Context,
		subscriptionID string,
		resourceGroupName string,
		serverName string,
		databaseName string,
		policy azuresqlshared.SQLDatabaseBackupLongTermRetentionPolicy) (*sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture, error)

	resourcemanager.ARMClient
}

SqlDbManager is the client for the resource manager for SQL databases

Jump to

Keyboard shortcuts

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