database

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMySQLUpToDate

func IsMySQLUpToDate(p azuredbv1beta1.SQLServerParameters, in mysql.Server) bool

IsMySQLUpToDate is used to report whether given mysql.Server is in sync with the SQLServerParameters that user desires.

func IsPostgreSQLUpToDate

func IsPostgreSQLUpToDate(p azuredbv1beta1.SQLServerParameters, in postgresql.Server) bool

IsPostgreSQLUpToDate is used to report whether given postgresql.Server is in sync with the SQLServerParameters that user desires.

func LateInitializeMySQL

func LateInitializeMySQL(p *azuredbv1beta1.SQLServerParameters, in mysql.Server)

LateInitializeMySQL fills the empty values of SQLServerParameters with the ones that are retrieved from the Azure API.

func LateInitializePostgreSQL

func LateInitializePostgreSQL(p *azuredbv1beta1.SQLServerParameters, in postgresql.Server)

LateInitializePostgreSQL fills the empty values of SQLServerParameters with the ones that are retrieved from the Azure API.

func MySQLServerVirtualNetworkRuleNeedsUpdate

func MySQLServerVirtualNetworkRuleNeedsUpdate(kube *azuredbv1alpha3.MySQLServerVirtualNetworkRule, az mysql.VirtualNetworkRule) bool

MySQLServerVirtualNetworkRuleNeedsUpdate determines if a virtual network rule needs to be updated

func NewMySQLVirtualNetworkRuleParameters

func NewMySQLVirtualNetworkRuleParameters(v *azuredbv1alpha3.MySQLServerVirtualNetworkRule) mysql.VirtualNetworkRule

NewMySQLVirtualNetworkRuleParameters returns an Azure VirtualNetworkRule object from a virtual network spec

func NewPostgreSQLVirtualNetworkRuleParameters

func NewPostgreSQLVirtualNetworkRuleParameters(v *azuredbv1alpha3.PostgreSQLServerVirtualNetworkRule) postgresql.VirtualNetworkRule

NewPostgreSQLVirtualNetworkRuleParameters returns an Azure VirtualNetworkRule object from a virtual network spec

func PostgreSQLServerVirtualNetworkRuleNeedsUpdate

func PostgreSQLServerVirtualNetworkRuleNeedsUpdate(kube *azuredbv1alpha3.PostgreSQLServerVirtualNetworkRule, az postgresql.VirtualNetworkRule) bool

PostgreSQLServerVirtualNetworkRuleNeedsUpdate determines if a virtual network rule needs to be updated

func ToMySQLSKU

func ToMySQLSKU(skuSpec azuredbv1beta1.SKU) (*mysql.Sku, error)

ToMySQLSKU returns a *mysql.Sku object that can be used in Azure API calls.

func ToPostgreSQLSKU

func ToPostgreSQLSKU(skuSpec azuredbv1beta1.SKU) (*postgresql.Sku, error)

ToPostgreSQLSKU returns a *postgresql.Sku object that can be used in Azure API calls.

func UpdateMySQLObservation added in v0.4.0

func UpdateMySQLObservation(o *azuredbv1beta1.SQLServerObservation, in mysql.Server)

UpdateMySQLObservation produces SQLServerObservation from mysql.Server.

func UpdateMySQLVirtualNetworkRuleStatusFromAzure

func UpdateMySQLVirtualNetworkRuleStatusFromAzure(v *azuredbv1alpha3.MySQLServerVirtualNetworkRule, az mysql.VirtualNetworkRule)

UpdateMySQLVirtualNetworkRuleStatusFromAzure updates the status related to the external Azure MySQLVirtualNetworkRule in the VirtualNetworkStatus

func UpdatePostgreSQLObservation added in v0.4.0

func UpdatePostgreSQLObservation(o *azuredbv1beta1.SQLServerObservation, in postgresql.Server)

UpdatePostgreSQLObservation produces SQLServerObservation from postgresql.Server.

func UpdatePostgreSQLVirtualNetworkRuleStatusFromAzure

func UpdatePostgreSQLVirtualNetworkRuleStatusFromAzure(v *azuredbv1alpha3.PostgreSQLServerVirtualNetworkRule, az postgresql.VirtualNetworkRule)

UpdatePostgreSQLVirtualNetworkRuleStatusFromAzure updates the status related to the external Azure PostgreSQLVirtualNetworkRule in the VirtualNetworkStatus

Types

type MySQLServerAPI

type MySQLServerAPI interface {
	ServerNameTaken(ctx context.Context, s *azuredbv1beta1.MySQLServer) (bool, error)
	GetServer(ctx context.Context, s *azuredbv1beta1.MySQLServer) (mysql.Server, error)
	CreateServer(ctx context.Context, s *azuredbv1beta1.MySQLServer, adminPassword string) error
	UpdateServer(ctx context.Context, s *azuredbv1beta1.MySQLServer) error
	DeleteServer(ctx context.Context, s *azuredbv1beta1.MySQLServer) error
	GetRESTClient() autorest.Sender
}

MySQLServerAPI represents the API interface for a MySQL Server client

type MySQLServerClient

type MySQLServerClient struct {
	mysql.ServersClient
	mysql.CheckNameAvailabilityClient
}

MySQLServerClient is the concrete implementation of the MySQLServerAPI interface for MySQL that calls Azure API.

func NewMySQLServerClient

func NewMySQLServerClient(c *azure.Client) (*MySQLServerClient, error)

NewMySQLServerClient creates and initializes a MySQLServerClient instance.

func (*MySQLServerClient) CreateServer

func (c *MySQLServerClient) CreateServer(ctx context.Context, cr *azuredbv1beta1.MySQLServer, adminPassword string) error

CreateServer creates a MySQL Server.

func (*MySQLServerClient) DeleteServer

DeleteServer deletes the given MySQLServer resource.

func (*MySQLServerClient) GetRESTClient added in v0.4.0

func (c *MySQLServerClient) GetRESTClient() autorest.Sender

GetRESTClient returns the underlying REST client that the client object uses.

func (*MySQLServerClient) GetServer

GetServer retrieves the requested MySQL Server

func (*MySQLServerClient) ServerNameTaken

func (c *MySQLServerClient) ServerNameTaken(ctx context.Context, s *azuredbv1beta1.MySQLServer) (bool, error)

ServerNameTaken returns true if the supplied server's name has been taken.

func (*MySQLServerClient) UpdateServer

UpdateServer updates a MySQL Server.

type MySQLVirtualNetworkRulesClient

type MySQLVirtualNetworkRulesClient mysqlapi.VirtualNetworkRulesClientAPI

A MySQLVirtualNetworkRulesClient handles CRUD operations for Azure Virtual Network Rules.

func NewMySQLVirtualNetworkRulesClient

func NewMySQLVirtualNetworkRulesClient(ctx context.Context, credentials []byte) (MySQLVirtualNetworkRulesClient, error)

NewMySQLVirtualNetworkRulesClient returns a new Azure Virtual Network Rules client. Credentials must be passed as JSON encoded data.

type PostgreSQLServerAPI

type PostgreSQLServerAPI interface {
	ServerNameTaken(ctx context.Context, s *azuredbv1beta1.PostgreSQLServer) (bool, error)
	GetServer(ctx context.Context, s *azuredbv1beta1.PostgreSQLServer) (postgresql.Server, error)
	CreateServer(ctx context.Context, s *azuredbv1beta1.PostgreSQLServer, adminPassword string) error
	DeleteServer(ctx context.Context, s *azuredbv1beta1.PostgreSQLServer) error
	UpdateServer(ctx context.Context, s *azuredbv1beta1.PostgreSQLServer) error
	GetRESTClient() autorest.Sender
}

PostgreSQLServerAPI represents the API interface for a MySQL Server client

type PostgreSQLServerClient

type PostgreSQLServerClient struct {
	postgresql.ServersClient
	postgresql.CheckNameAvailabilityClient
}

PostgreSQLServerClient is the concreate implementation of the SQLServerAPI interface for PostgreSQL that calls Azure API.

func NewPostgreSQLServerClient

func NewPostgreSQLServerClient(c *azure.Client) (*PostgreSQLServerClient, error)

NewPostgreSQLServerClient creates and initializes a PostgreSQLServerClient instance.

func (*PostgreSQLServerClient) CreateServer

func (c *PostgreSQLServerClient) CreateServer(ctx context.Context, cr *azuredbv1beta1.PostgreSQLServer, adminPassword string) error

CreateServer creates a PostgreSQL Server

func (*PostgreSQLServerClient) DeleteServer

DeleteServer deletes the given PostgreSQL resource

func (*PostgreSQLServerClient) GetRESTClient added in v0.4.0

func (c *PostgreSQLServerClient) GetRESTClient() autorest.Sender

GetRESTClient returns the underlying REST client that the client object uses.

func (*PostgreSQLServerClient) GetServer

GetServer retrieves the requested PostgreSQL Server

func (*PostgreSQLServerClient) ServerNameTaken

ServerNameTaken returns true if the supplied server's name has been taken.

func (*PostgreSQLServerClient) UpdateServer

UpdateServer updates a PostgreSQL Server.

type PostgreSQLVirtualNetworkRulesClient

type PostgreSQLVirtualNetworkRulesClient postgresqlapi.VirtualNetworkRulesClientAPI

A PostgreSQLVirtualNetworkRulesClient handles CRUD operations for Azure Virtual Network Rules.

func NewPostgreSQLVirtualNetworkRulesClient

func NewPostgreSQLVirtualNetworkRulesClient(ctx context.Context, credentials []byte) (PostgreSQLVirtualNetworkRulesClient, error)

NewPostgreSQLVirtualNetworkRulesClient returns a new Azure Virtual Network Rules client. Credentials must be passed as JSON encoded data.

Jump to

Keyboard shortcuts

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