-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtypes.go
More file actions
216 lines (192 loc) · 7.39 KB
/
types.go
File metadata and controls
216 lines (192 loc) · 7.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
package linodego
import (
"encoding/json"
_ "fmt"
)
type Response struct {
Errors []Error `json:"ERRORARRAY"`
RawData json.RawMessage `json:"DATA"`
Action string `json:"ACTION"`
}
type Error struct {
ErrorCode int `json:"ERRORCODE"`
ErrorMessage string `json:"ERRORMESSAGE"`
}
type DataCenter struct {
DataCenterId int `json:"DATACENTERID"`
Location string `json:"LOCATION"`
Abbr string `json:"ABBR"`
}
type Distribution struct {
Is64Bit int `json:"IS64BIT"`
Label CustomString `json:"LABEL"`
MinImageSize int `json:"MINIMAGESIZE"`
DistributionId int `json:"DISTRIBUTIONID"`
CreatedDt CustomTime `json:"CREATE_DT"`
RequiresPVOPSKernel int `json:"REQUIRESPVOPSKERNEL"`
}
type Kernel struct {
Label CustomString `json:"LABEL"`
IsXen int `json:"ISXEN"`
IsPVOPS int `json:"ISPVOPS"`
KernelId int `json:"KERNELID"`
}
type LinodePlan struct {
Cores int `json:"CORES"`
Price float32 `json:"PRICE"`
RAM int `json:"RAM"`
Xfer int `json:"Xfer"`
PlanId int `json:"PLANID"`
Label CustomString `json:"LABEL"`
Avail map[string]int `json:"AVAIL"`
Disk int `json:"DISK"`
Hourly float32 `json:"HOURLY"`
}
type NodeBalancer struct {
Hourly float32 `json:"HOURLY"`
Monthly float32 `json:"MONTHLY"`
Connections int `json:"CONNECTIONS"`
}
type StackScript struct {
//Script string `json:"SCRIPT"`
//Description string `json:"DESCRIPTION"`
//DistributionidList int `json:"DISTRIBUTIONIDLIST"`
Label CustomString `json:"LABEL"`
DeploymentsTotal int `json:"DEPLOYMENTSTOTAL"`
LatestRev int `json:"LATESTREV"`
CreatedDt CustomTime `json:"CREATE_DT"`
DeploymentsActive int `json:"DEPLOYMENTSACTIVE"`
StackScriptId int `json:"STACKSCRIPTID"`
RevNote int `json:"REV_NOTE"`
RevDt int `json:"REV_DT"`
IsPublic int `json:"ISPUBLIC"`
UserId int `json:"USERID"`
}
type EstimateInvoice struct {
InvoiceTo CustomShortTime `json:"INVOICE_TO"`
Amount float32 `json:"AMOUNT"`
}
type AccountInfo struct {
AccountSince CustomTime `json:"ACTIVE_SINCE"`
TransferPool int `json:"TRANSFER_POOL"`
TransferUsed int `json:"TRANSFER_USED"`
TransferBillable int `json:"TRANSFER_BILLABLE"`
BillingMethod string `json:"BILLING_METHOD"`
Managed bool `json:"MANAGED"`
Balance float32 `json:"BALANCE"`
}
type Image struct {
CreateDt CustomTime `json:"CREATE_DT"`
Creator string `json:"CREATOR"`
Description string `json:"DESCRIPTION"`
FsType string `json:"FS_TYPE"`
ImageId int `json:"IMAGEID"`
IsPublic int `json:"ISPUBLIC"`
Label CustomString `json:"LABEL"`
LastUsedDt CustomTime `json:"LAST_USED_DT"`
MinSize int `json:"MINSIZE"`
Status string `json:"STATUS"`
Type string `json:"TYPE"`
}
type Linode struct {
TotalXFer int `json:"TOTALXFER"`
BackupsEnabled int `json:"BACKUPSENABLED"`
WatchDog int `json:"WATCHDOG"`
LpmDisplayGroup string `json:"LPM_DISPLAYGROUP"`
AlertBwQuotaEnabled int `json:"ALERT_BWQUOTA_ENABLED"`
Status int `json:"STATUS"`
TotalRAM int `json:"TOTALRAM"`
AlertDiskIOThreshold int `json:"ALERT_DISKIO_THRESHOLD"`
BackupWindow int `json:"BACKUPWINDOW"`
AlertBwOutEnabled int `json:"ALERT_BWOUT_ENABLED"`
AlertBwOutThreshold int `json:"ALERT_BWOUT_THRESHOLD"`
Label CustomString `json:"LABEL"`
AlertCPUEnabled int `json:"ALERT_CPU_ENABLED"`
AlertBwQuotaThreshold int `json:"ALERT_BWQUOTA_THRESHOLD"`
AlertBwInThreshold int `json:"ALERT_BWIN_THRESHOLD"`
BackupWeeklyDay int `json:"BACKUPWEEKLYDAY"`
DataCenterId int `json:"DATACENTERID"`
AlertCPUThreshold int `json:"ALERT_CPU_THRESHOLD"`
TotalHD int `json:"TOTALHD"`
AlertDiskIOEnabled int `json:"ALERT_DISKIO_ENABLED"`
AlertBwInEnabled int `json:"ALERT_BWIN_ENABLED"`
LinodeId int `json:"LINODEID"`
CreateDt CustomTime `json:"CREATE_DT"`
PlanId int `json:"PLANID"`
DistributionVendor string `json:"DISTRIBUTIONVENDOR"`
}
type LinodeId struct {
LinodeId int `json:"LinodeID"`
}
type Job struct {
EnteredDt CustomTime `json:"ENTERED_DT"`
Action string `json:"ACTION"`
Label string `json:"LABEL"`
HostStartDt CustomTime `json:"HOST_START_DT"`
LinodeId int `json:"LINODEID"`
HostFinishDt CustomTime `json:"HOST_FINISH_DT"`
HostMessage string `json:"HOST_MESSAGE"`
JobId int `json:"JOBID"`
HostSuccess CustomString `json:"HOST_SUCCESS"` // Linode API returns empty string if HostSuccess is false. 1 otherwise.
}
type LinodeConfig struct {
HelperDisableUpdateDB int `json:"helper_disableUpdateDB"`
RootDeviceRO bool `json:"RootDeviceRO"`
RootDeviceCustom string `json:"RootDeviceCustom"`
Label CustomString `json:"Label"`
DiskList string `json:"DiskList"`
LinodeId int `json:"LinodeID"`
Comments string `json:"Comments"`
ConfigId int `json:"ConfigID"`
HelperXen int `json:"helper_xen"` // Depreciated, use HelperDistro instead
HelperDistro CustomBool `json:"helper_distro"`
RunLevel string `json:"RunLevel"`
HelperDepmod CustomBool `json:"helper_depmod"`
KernelId int `json:"KernelID"`
RootDeviceNum int `json:"RootDeviceNum"`
HelperLibtls CustomBool `json:"helper_libtls"`
HelperNetwork CustomBool `json:"helper_network"`
RAMLimit int `json:"RAMLimit"`
}
type LinodeConfigId struct {
LinodeConfigId int `json:"ConfigID"`
}
type JobId struct {
JobId int `json:"JobID"`
}
type DiskJob struct {
JobId int `json:"JobID"`
DiskId int `json:"DiskID"`
}
type Disk struct {
UpdateDt CustomTime `json:"UPDATE_DT"`
DiskId int `json:"DISKID"`
Label CustomString `json:"LABEL"`
Type string `json:"TYPE"`
LinodeId int `json:"LINODEID"`
IsReadOnly int `json:"ISREADONLY"`
Status int `json:"STATUS"`
CreateDt CustomTime `json:"CREATE_DT"`
Size int `json:"SIZE"`
}
type IPAddress struct {
IPAddress string `json:"IPAddress"`
IPAddressId int `json:"IPAddressID"`
}
type FullIPAddress struct {
LinodeId int `json:"LINODEID"`
IsPublic int `json:"ISPUBLIC"`
RDNSName string `json:"RDNS_NAME"`
IPAddress string `json:"IPADDRESS"`
IPAddressId int `json:"IPADDRESSID"`
}
type RDNSIPAddress struct {
HostName string `json:"HOSTNAME"`
IPAddress string `json:"IPADDRESS"`
IPAddressId int `json:"IPADDRESSID"`
}
type LinodeIPAddress struct {
LinodeId int `json:"LINODEID"`
IPAddress string `json:"IPADDRESS"`
IPAddressId int `json:"IPADDRESSID"`
}