-
Notifications
You must be signed in to change notification settings - Fork 7
/
results.go
123 lines (103 loc) · 3.68 KB
/
results.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
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
package cluster
import (
"github.com/huaweicloud/terraform-provider-hcs/huaweicloudstack/sdk/huaweicloud"
"github.com/huaweicloud/terraform-provider-hcs/huaweicloudstack/sdk/huaweicloud/openstack/common/tags"
)
type Cluster struct {
Status string `json:"status"`
SubStatus string `json:"sub_status"`
Updated string `json:"updated"` //ISO8601:YYYY-MM-DDThh:mm:ssZ
Endpoints []Endpoints `json:"endPoints"`
Name string `json:"name"`
NumberOfNode int `json:"number_of_node"`
AvailabilityZone string `json:"availability_zone"`
SubnetID string `json:"subnet_id"`
PublicEndpoints []PublicEndpoints `json:"public_endpoints"`
Created string `json:"created"` //ISO8601:YYYY-MM-DDThh:mm:ssZ
SecurityGroupID string `json:"security_group_id"`
Port int `json:"port"`
NodeType string `json:"node_type"`
Version string `json:"version"`
PublicIp *PublicIp `json:"public_ip"`
FailedReasons *FailInfo `json:"failed_reasons"`
VpcID string `json:"vpc_id"`
TaskStatus string `json:"task_status"`
UserName string `json:"user_name"`
ID string `json:"id"`
ActionProgress map[string]string `json:"action_progress"`
RecentEvent int `json:"recent_event"`
Tags []tags.ResourceTag `json:"tags"`
EnterpriseProjectId string `json:"enterprise_project_id"`
}
type ClusterDetail struct {
Cluster
PrivateIp []string `json:"private_ip"`
ParameterGroup *ParameterGroup `json:"parameter_group"`
NodeTypeId string `json:"node_type_id"`
NodeDetail *NodeDetail `json:"node_detail"`
MaintainWindow *MaintainWindow `json:"maintain_window"`
ResizeInfo *ResizeInfo `json:"resize_info"`
}
type ClusterDetailsRst struct {
Cluster ClusterDetail `json:"cluster"`
}
type CreateClusterRst struct {
Cluster IdObject `json:"cluster"`
}
type IdObject struct {
Id string `json:"id"`
}
type ListClustersRst struct {
Clusters []Cluster `json:"clusters"`
}
type FailInfo struct {
ErrorCode string `json:"error_code"`
ErrorMsg string `json:"error_msg"`
}
type PublicIp struct {
EipID string `json:"eip_id"`
PublicBindType string `json:"public_bind_type"`
}
type FailedReasons struct {
FailInfo FailInfo `json:"fail_info"`
}
type Endpoints struct {
ConnectInfo string `json:"connect_info"`
JdbcUrl string `json:"jdbc_url"`
}
type PublicEndpoints struct {
PublicConnectInfo string `json:"public_connect_info"`
JdbcUrl string `json:"jdbc_url"`
}
type ParameterGroup struct {
Name string `json:"name"`
Id string `json:"id"`
Status string `json:"status"` // In-Sync,Applying.Pending-Reboot,Sync-Failure
}
type NodeDetail struct {
Name string `json:"name"`
Value string `json:"value"`
}
type MaintainWindow struct {
StartTime string `json:"start_time"` // HH:mm,timezoue:GMT+0。
EndTime string `json:"end_time"`
Day string `json:"day"`
}
type ResizeInfo struct {
ResizeStatus string `json:"resize_status"` //GROWING,RESIZE_FAILURE
StartTime string `json:"start_time"` //ISO8601:YYYY-MM-DDThh:mm:ss
TargetNodeNum int `json:"target_node_num"`
OriginNodeNum int `json:"origin_node_num"`
}
type GetResult struct {
golangsdk.Result
}
type CreateRsp struct {
ID string `json:"id"`
}
type CreateResult struct {
golangsdk.Result
}
type DeleteResult struct {
golangsdk.ErrResult
}