Repository navigation
Expand file tree
/
Copy pathinstance.go
More file actions
81 lines (72 loc) · 2.27 KB
/
Copy pathinstance.go
File metadata and controls
81 lines (72 loc) · 2.27 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
package mcsmapi
// InstanceListResponse represents the response structure for a list of instances.
type InstanceListResponse struct {
Status int `json:"status"`
Data struct {
MaxPage int `json:"maxPage"`
PageSize int `json:"pageSize"`
AllTags []string `json:"allTags"`
Data []*InstanceDetail `json:"data"`
} `json:"data"`
Time int64 `json:"time"`
}
// InstanceDetailResponse represents the response structure for a single instance.
type InstanceDetailResponse struct {
Status int `json:"status"`
Data *InstanceDetail `json:"data"`
Time int64 `json:"time"`
}
// CreateInstanceResponse represents the response structure after creating an instance.
type CreateInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
Config *InstanceConfig `json:"config"`
} `json:"data"`
Time int64 `json:"time"`
}
type UpdateConfigResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
// DeleteInstancesResponse represents the response for deleting instances.
type DeleteInstancesResponse struct {
Status int `json:"status"`
Data []string `json:"data"`
Time int64 `json:"time"`
}
// StartInstanceResponse represents the response for starting an instance.
type StartInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
// StopInstanceResponse represents the response for stopping an instance.
type StopInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
// RestartInstanceResponse represents the response for restarting an instance.
type RestartInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
// KillInstanceResponse represents the response for killing an instance.
type KillInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}