...
1
2
3 package sql
4
5
6
7
8 import (
9 "encoding/xml"
10 )
11
12
13
14
15
16 type DatabaseServerCreateParams struct {
17 XMLName xml.Name `xml:"http://schemas.microsoft.com/sqlazure/2010/12/ Server"`
18 AdministratorLogin string
19 AdministratorLoginPassword string
20 Location string
21 Version string
22 }
23
24
25
26 type DatabaseServerCreateResponse struct {
27 ServerName string
28 }
29
30 const (
31 DatabaseServerVersion11 = "2.0"
32 DatabaseServerVersion12 = "12.0"
33 )
34
35
36
37
38
39 type DatabaseServer struct {
40 Name string
41 AdministratorLogin string
42 Location string
43 FullyQualifiedDomainName string
44 Version string
45 State string
46 }
47
48 type ListServersResponse struct {
49 DatabaseServers []DatabaseServer `xml:"Server"`
50 }
51
52
53
54
55
56 type FirewallRuleCreateParams struct {
57 XMLName xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
58 Name string
59 StartIPAddress string
60 EndIPAddress string
61 }
62
63
64
65
66
67 type FirewallRuleResponse struct {
68 Name string
69 StartIPAddress string
70 EndIPAddress string
71 }
72
73 type ListFirewallRulesResponse struct {
74 FirewallRules []FirewallRuleResponse `xml:"ServiceResource"`
75 }
76
77
78
79
80
81 type FirewallRuleUpdateParams struct {
82 XMLName xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
83 Name string
84 StartIPAddress string
85 EndIPAddress string
86 }
87
88
89
90
91
92 type DatabaseCreateParams struct {
93 XMLName xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
94 Name string
95 Edition string `xml:",omitempty"`
96 CollationName string `xml:",omitempty"`
97 MaxSizeBytes int64 `xml:",omitempty"`
98 ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
99 }
100
101
102
103
104
105 type ServiceResource struct {
106 Name string
107 State string
108 SelfLink string
109 Edition string
110 CollationName string
111 MaxSizeBytes int64
112 ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
113 }
114
115 type ListDatabasesResponse struct {
116 ServiceResources []ServiceResource `xml:"ServiceResource"`
117 }
118
119
120
121
122
123 type ServiceResourceUpdateParams struct {
124 XMLName xml.Name `xml:"http://schemas.microsoft.com/windowsazure ServiceResource"`
125 Name string
126 Edition string `xml:",omitempty"`
127 MaxSizeBytes int64 `xml:",omitempty"`
128 ServiceObjectiveID string `xml:"ServiceObjectiveId,omitempty"`
129 }
130
View as plain text