database

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 16 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 MySQLServerFirewallRuleIsUpToDate added in v0.10.0

func MySQLServerFirewallRuleIsUpToDate(kube *azuredbv1alpha3.MySQLServerFirewallRule, az mysql.FirewallRule) bool

MySQLServerFirewallRuleIsUpToDate returns true if the supplied FirewallRule appears to be up to date with the supplied MySQLServerFirewallRule.

func MySQLServerVirtualNetworkRuleNeedsUpdate

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

MySQLServerVirtualNetworkRuleNeedsUpdate determines if a virtual network rule needs to be updated

func NewMySQLFirewallRuleParameters added in v0.10.0

func NewMySQLFirewallRuleParameters(r *azuredbv1alpha3.MySQLServerFirewallRule) mysql.FirewallRule

NewMySQLFirewallRuleParameters returns an Azure FirewallRule object from a firewall spec.

func NewMySQLVirtualNetworkRuleParameters

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

NewMySQLVirtualNetworkRuleParameters returns an Azure VirtualNetworkRule object from a virtual network spec

func NewPostgreSQLFirewallRuleParameters added in v0.10.0

func NewPostgreSQLFirewallRuleParameters(r *azuredbv1alpha3.PostgreSQLServerFirewallRule) postgresql.FirewallRule

NewPostgreSQLFirewallRuleParameters returns an Azure FirewallRule object from a firewall spec.

func NewPostgreSQLVirtualNetworkRuleParameters

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

NewPostgreSQLVirtualNetworkRuleParameters returns an Azure VirtualNetworkRule object from a virtual network spec

func PostgreSQLServerFirewallRuleIsUpToDate added in v0.10.0

func PostgreSQLServerFirewallRuleIsUpToDate(kube *azuredbv1alpha3.PostgreSQLServerFirewallRule, az postgresql.FirewallRule) bool

PostgreSQLServerFirewallRuleIsUpToDate returns true if the supplied FirewallRule appears to be up to date with the supplied PostgreSQLServerFirewallRule.

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

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

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 {
	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
}

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

func NewMySQLServerClient

func NewMySQLServerClient(cl mysql.ServersClient) *MySQLServerClient

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

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) UpdateServer

UpdateServer updates a MySQL Server.

type PostgreSQLServerAPI

type PostgreSQLServerAPI interface {
	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 PostgreSQL Server client

type PostgreSQLServerClient

type PostgreSQLServerClient struct {
	postgresql.ServersClient
}

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

func NewPostgreSQLServerClient

func NewPostgreSQLServerClient(cl postgresql.ServersClient) *PostgreSQLServerClient

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

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) UpdateServer

UpdateServer updates a PostgreSQL Server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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