-
Notifications
You must be signed in to change notification settings - Fork 132
/
types_vrack.go
74 lines (59 loc) · 2.07 KB
/
types_vrack.go
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
package ovh
import (
"time"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
type VrackDedicatedServerInterface struct {
Vrack string `json:"vrack"`
DedicatedServerInterface string `json:"dedicatedServerInterface"`
}
type VrackDedicatedServerInterfaceCreateOpts struct {
DedicatedServerInterface string `json:"dedicatedServerInterface"`
}
func (opts *VrackDedicatedServerInterfaceCreateOpts) FromResource(d *schema.ResourceData) *VrackDedicatedServerInterfaceCreateOpts {
opts.DedicatedServerInterface = d.Get("interface_id").(string)
return opts
}
type VrackDedicatedServer struct {
Vrack string `json:"vrack"`
DedicatedServer string `json:"dedicatedServer"`
}
type VrackDedicatedServerCreateOpts struct {
DedicatedServer string `json:"dedicatedServer"`
}
func (opts *VrackDedicatedServerCreateOpts) FromResource(d *schema.ResourceData) *VrackDedicatedServerCreateOpts {
opts.DedicatedServer = d.Get("server_id").(string)
return opts
}
type VrackCloudProject struct {
Vrack string `json:"vrack"`
Project string `json:"project"`
}
type VrackCloudProjectCreateOpts struct {
Project string `json:"project"`
}
func (opts *VrackCloudProjectCreateOpts) FromResource(d *schema.ResourceData) *VrackCloudProjectCreateOpts {
opts.Project = d.Get("project_id").(string)
return opts
}
type VrackIpLoadbalancing struct {
Vrack string `json:"vrack"`
IpLoadbalancing string `json:"ipLoadbalancing"`
}
type VrackIpLoadbalancingCreateOpts struct {
IpLoadbalancing string `json:"ipLoadbalancing"`
}
func (opts *VrackIpLoadbalancingCreateOpts) FromResource(d *schema.ResourceData) *VrackIpLoadbalancingCreateOpts {
opts.IpLoadbalancing = d.Get("ip_loadbalancing").(string)
return opts
}
type VrackTask struct {
Id int `json:"id"`
Function string `json:"function"`
TargetDomain string `json:"targetDomain"`
Status string `json:"status"`
ServiceName string `json:"serviceName"`
OrderId int `json:"orderId"`
LastUpdate time.Time `json:"lastUpdate"`
TodoDate time.Time `json:"TodoDate"`
}