database

package
v0.0.0-...-5653ff1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPSQLDatabasesClient

func GetPSQLDatabasesClient(creds config.Credentials) (psql.DatabasesClient, error)

GetPSQLDatabasesClient retrieves the psqldabase

Types

type PSQLDatabaseClient

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

func NewPSQLDatabaseClient

func NewPSQLDatabaseClient(creds config.Credentials) *PSQLDatabaseClient

func (*PSQLDatabaseClient) CheckDatabaseNameAvailability

func (c *PSQLDatabaseClient) CheckDatabaseNameAvailability(ctx context.Context, databasename string) (bool, error)

func (*PSQLDatabaseClient) CreateDatabaseIfValid

func (c *PSQLDatabaseClient) CreateDatabaseIfValid(ctx context.Context, databasename string, servername string, resourcegroup string) (*http.Response, error)

func (*PSQLDatabaseClient) Delete

Delete removes the Postgres database

func (*PSQLDatabaseClient) DeleteDatabase

func (c *PSQLDatabaseClient) DeleteDatabase(ctx context.Context, databasename string, servername string, resourcegroup string) (status string, err error)

func (*PSQLDatabaseClient) Ensure

Ensure ensures a Postgres database exists

func (*PSQLDatabaseClient) GetDatabase

func (c *PSQLDatabaseClient) GetDatabase(ctx context.Context, resourcegroup string, servername string, databasename string) (db psql.Database, err error)

func (*PSQLDatabaseClient) GetParents

GetParents gets the database's parents

func (*PSQLDatabaseClient) GetStatus

func (p *PSQLDatabaseClient) GetStatus(obj runtime.Object) (*v1alpha1.ASOStatus, error)

GetStatus gets the status

type PostgreSQLDatabaseManager

type PostgreSQLDatabaseManager interface {
	CheckDatabaseNameAvailability(ctx context.Context,
		databasename string) (bool, error)

	CreateDatabaseIfValid(ctx context.Context,
		databasename string,
		servername string,
		resourcegroup string) (*http.Response, error)

	DeleteDatabase(ctx context.Context,
		databasename string,
		servername string,
		resourcegroup string) (string, error)

	GetDatabase(ctx context.Context,
		resourcegroup string,
		servername string,
		database string) (psql.Database, error)

	// also embed async client methods
	resourcemanager.ARMClient
}

Jump to

Keyboard shortcuts

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