sql

package
v44.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseServerVersion11 = "2.0"
	DatabaseServerVersion12 = "12.0"
)
View Source
const (
	DatabaseStateCreating = "Creating"
)

Definitions of numerous constants representing API endpoints.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseCreateParams

type DatabaseCreateParams struct {
	XMLName            xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
	Name               string
	Edition            string `xml:",omitempty"`
	CollationName      string `xml:",omitempty"`
	MaxSizeBytes       int64  `xml:",omitempty"`
	ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
}

DatabaseCreateParams represents the set of possible parameters when issuing a database creation to Azure, and reading a list response from Azure.

https://msdn.microsoft.com/en-us/library/azure/dn505701.aspx

type DatabaseServer

type DatabaseServer struct {
	Name                     string
	AdministratorLogin       string
	Location                 string
	FullyQualifiedDomainName string
	Version                  string
	State                    string
}

DatabaseServer represents the set of data received from a database server list operation.

https://msdn.microsoft.com/en-us/library/azure/dn505702.aspx

type DatabaseServerCreateParams

type DatabaseServerCreateParams struct {
	XMLName                    xml.Name `xml:"http://schemas.microsoft.com/sqlazure/2010/12/ Server"`
	AdministratorLogin         string
	AdministratorLoginPassword string
	Location                   string
	Version                    string
}

DatabaseServerCreateParams represents the set of possible parameters when issuing a database server creation request to Azure.

https://msdn.microsoft.com/en-us/library/azure/dn505699.aspx

type DatabaseServerCreateResponse

type DatabaseServerCreateResponse struct {
	ServerName string
}

DatabaseServerCreateResponse represents the response following the creation of a database server on Azure.

type FirewallRuleCreateParams

type FirewallRuleCreateParams struct {
	XMLName        xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
	Name           string
	StartIPAddress string
	EndIPAddress   string
}

FirewallRuleCreateParams represents the set of possible parameters when creating a firewall rule on an Azure database server.

https://msdn.microsoft.com/en-us/library/azure/dn505712.aspx

type FirewallRuleResponse

type FirewallRuleResponse struct {
	Name           string
	StartIPAddress string
	EndIPAddress   string
}

FirewallRuleResponse represents the set of data received from an Azure database server firewall rule get response.

https://msdn.microsoft.com/en-us/library/azure/dn505698.aspx

type FirewallRuleUpdateParams

type FirewallRuleUpdateParams struct {
	XMLName        xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
	Name           string
	StartIPAddress string
	EndIPAddress   string
}

FirewallRuleUpdateParams represents the set of possible parameters when issuing an update of a database server firewall rule.

https://msdn.microsoft.com/en-us/library/azure/dn505707.aspx

type ListDatabasesResponse

type ListDatabasesResponse struct {
	ServiceResources []ServiceResource `xml:"ServiceResource"`
}

type ListFirewallRulesResponse

type ListFirewallRulesResponse struct {
	FirewallRules []FirewallRuleResponse `xml:"ServiceResource"`
}

type ListServersResponse

type ListServersResponse struct {
	DatabaseServers []DatabaseServer `xml:"Server"`
}

type SQLDatabaseClient

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

SQLDatabaseClient defines various database CRUD operations. It contains a management.Client for making the actual http calls.

func NewClient

func NewClient(mgmtClient management.Client) SQLDatabaseClient

NewClient returns a new SQLDatabaseClient struct with the provided management.Client as the underlying client.

func (SQLDatabaseClient) CreateDatabase

func (c SQLDatabaseClient) CreateDatabase(server string, params DatabaseCreateParams) error

CreateDatabase creates a new Microsoft Azure SQL Database on the given database server.

https://msdn.microsoft.com/en-us/library/azure/dn505701.aspx

func (SQLDatabaseClient) CreateFirewallRule

func (c SQLDatabaseClient) CreateFirewallRule(server string, params FirewallRuleCreateParams) error

CreateFirewallRule creates an Azure SQL Database server firewall rule.

https://msdn.microsoft.com/en-us/library/azure/dn505712.aspx

func (SQLDatabaseClient) CreateServer

func (c SQLDatabaseClient) CreateServer(params DatabaseServerCreateParams) (string, error)

CreateServer creates a new Azure SQL Database server and return its name.

https://msdn.microsoft.com/en-us/library/azure/dn505699.aspx

func (SQLDatabaseClient) DeleteDatabase

func (c SQLDatabaseClient) DeleteDatabase(server, database string) error

DeleteDatabase deletes the Azure SQL Database off the given server.

https://msdn.microsoft.com/en-us/library/azure/dn505705.aspx

func (SQLDatabaseClient) DeleteFirewallRule

func (c SQLDatabaseClient) DeleteFirewallRule(server, ruleName string) error

DeleteFirewallRule deletes an Azure SQL Database server firewall rule.

https://msdn.microsoft.com/en-us/library/azure/dn505706.aspx

func (SQLDatabaseClient) DeleteServer

func (c SQLDatabaseClient) DeleteServer(name string) error

DeleteServer deletes an Azure SQL Database server (including all its databases).

https://msdn.microsoft.com/en-us/library/azure/dn505695.aspx

func (SQLDatabaseClient) GetDatabase

func (c SQLDatabaseClient) GetDatabase(server, database string) (ServiceResource, error)

GetDatabase gets the details for an Azure SQL Database.

https://msdn.microsoft.com/en-us/library/azure/dn505708.aspx

func (SQLDatabaseClient) GetFirewallRule

func (c SQLDatabaseClient) GetFirewallRule(server, ruleName string) (FirewallRuleResponse, error)

GetFirewallRule gets the details of an Azure SQL Database Server firewall rule.

https://msdn.microsoft.com/en-us/library/azure/dn505698.aspx

func (SQLDatabaseClient) ListDatabases

func (c SQLDatabaseClient) ListDatabases(server string) (ListDatabasesResponse, error)

ListDatabases returns a list of Azure SQL Databases on the given server.

https://msdn.microsoft.com/en-us/library/azure/dn505711.aspx

func (SQLDatabaseClient) ListFirewallRules

func (c SQLDatabaseClient) ListFirewallRules(server string) (ListFirewallRulesResponse, error)

ListFirewallRules retrieves the set of firewall rules for an Azure SQL Database Server.

https://msdn.microsoft.com/en-us/library/azure/dn505715.aspx

func (SQLDatabaseClient) ListServers

func (c SQLDatabaseClient) ListServers() (ListServersResponse, error)

ListServers retrieves the Azure SQL Database servers for this subscription.

https://msdn.microsoft.com/en-us/library/azure/dn505702.aspx

func (SQLDatabaseClient) UpdateDatabase

func (c SQLDatabaseClient) UpdateDatabase(
	server, database string,
	params ServiceResourceUpdateParams) (management.OperationID, error)

UpdateDatabase updates the details of the given Database off the given server.

https://msdn.microsoft.com/en-us/library/azure/dn505718.aspx

func (SQLDatabaseClient) UpdateFirewallRule

func (c SQLDatabaseClient) UpdateFirewallRule(server, ruleName string, params FirewallRuleUpdateParams) error

UpdateFirewallRule update a firewall rule for an Azure SQL Database server.

https://msdn.microsoft.com/en-us/library/azure/dn505707.aspx

func (SQLDatabaseClient) WaitForDatabaseCreation

func (c SQLDatabaseClient) WaitForDatabaseCreation(
	server, database string,
	cancel chan struct{}) error

WaitForDatabaseCreation is a helper method which waits for the creation of the database on the given server.

type ServiceResource

type ServiceResource struct {
	Name               string
	State              string
	SelfLink           string
	Edition            string
	CollationName      string
	MaxSizeBytes       int64
	ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
}

ServiceResource represents the set of parameters obtained from a database get or list call.

https://msdn.microsoft.com/en-us/library/azure/dn505708.aspx

type ServiceResourceUpdateParams

type ServiceResourceUpdateParams struct {
	XMLName            xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
	Name               string
	Edition            string `xml:",omitempty"`
	MaxSizeBytes       int64  `xml:",omitempty"`
	ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
}

ServiceResourceUpdateParams represents the set of parameters available for a database service update operation.

https://msdn.microsoft.com/en-us/library/azure/dn505718.aspx

Jump to

Keyboard shortcuts

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