...

Package sql

import "github.com/Azure/azure-sdk-for-go/services/classic/management/sql"
Overview
Index

Overview ▾

Index ▾

Constants
type DatabaseCreateParams
type DatabaseServer
type DatabaseServerCreateParams
type DatabaseServerCreateResponse
type FirewallRuleCreateParams
type FirewallRuleResponse
type FirewallRuleUpdateParams
type ListDatabasesResponse
type ListFirewallRulesResponse
type ListServersResponse
type SQLDatabaseClient
    func NewClient(mgmtClient management.Client) SQLDatabaseClient
    func (c SQLDatabaseClient) CreateDatabase(server string, params DatabaseCreateParams) error
    func (c SQLDatabaseClient) CreateFirewallRule(server string, params FirewallRuleCreateParams) error
    func (c SQLDatabaseClient) CreateServer(params DatabaseServerCreateParams) (string, error)
    func (c SQLDatabaseClient) DeleteDatabase(server, database string) error
    func (c SQLDatabaseClient) DeleteFirewallRule(server, ruleName string) error
    func (c SQLDatabaseClient) DeleteServer(name string) error
    func (c SQLDatabaseClient) GetDatabase(server, database string) (ServiceResource, error)
    func (c SQLDatabaseClient) GetFirewallRule(server, ruleName string) (FirewallRuleResponse, error)
    func (c SQLDatabaseClient) ListDatabases(server string) (ListDatabasesResponse, error)
    func (c SQLDatabaseClient) ListFirewallRules(server string) (ListFirewallRulesResponse, error)
    func (c SQLDatabaseClient) ListServers() (ListServersResponse, error)
    func (c SQLDatabaseClient) UpdateDatabase(server, database string, params ServiceResourceUpdateParams) (management.OperationID, error)
    func (c SQLDatabaseClient) UpdateFirewallRule(server, ruleName string, params FirewallRuleUpdateParams) error
    func (c SQLDatabaseClient) WaitForDatabaseCreation(server, database string, cancel chan struct{}) error
type ServiceResource
type ServiceResourceUpdateParams

Package files

client.go entities.go

Constants

const (
    DatabaseServerVersion11 = "2.0"
    DatabaseServerVersion12 = "12.0"
)

Definitions of numerous constants representing API endpoints.

const (
    DatabaseStateCreating = "Creating"
)

type DatabaseCreateParams

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 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"`
}

type DatabaseServer

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

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

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

type DatabaseServerCreateParams

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 DatabaseServerCreateParams struct {
    XMLName                    xml.Name `xml:"http://schemas.microsoft.com/sqlazure/2010/12/ Server"`
    AdministratorLogin         string
    AdministratorLoginPassword string
    Location                   string
    Version                    string
}

type DatabaseServerCreateResponse

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

type DatabaseServerCreateResponse struct {
    ServerName string
}

type FirewallRuleCreateParams

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 FirewallRuleCreateParams struct {
    XMLName        xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
    Name           string
    StartIPAddress string
    EndIPAddress   string
}

type FirewallRuleResponse

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 FirewallRuleResponse struct {
    Name           string
    StartIPAddress string
    EndIPAddress   string
}

type FirewallRuleUpdateParams

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 FirewallRuleUpdateParams struct {
    XMLName        xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
    Name           string
    StartIPAddress string
    EndIPAddress   string
}

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

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

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

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

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 ServiceResource struct {
    Name               string
    State              string
    SelfLink           string
    Edition            string
    CollationName      string
    MaxSizeBytes       int64
    ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
}

type ServiceResourceUpdateParams

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

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

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"`
}