-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.go
91 lines (72 loc) · 1.65 KB
/
structs.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
package delete_systems
import (
"time"
)
type DeleteSystemRequest struct {
MinionName string `json:"minion_name"`
Token string `json:"authentication_token"`
}
type Get_System_Request struct {
Sessionkey string `xmlrpc:"sessionKey"`
System_Name string `xmlrpc:"name"`
}
type Delete_System_Request struct {
Sessionkey string `xmlrpc:"sessionKey"`
System_ID int `xmlrpc:"sid"`
Type string `xmlrpc:"cleanupType"`
}
type ListSystemInfo struct {
Result []struct {
Name string
Id int
Last_Checkin time.Time
Outdated_Pkg_Count int
}
}
type Delete_System_Return struct {
Result_ID *int `xml:"params>param>value>i4,omitempty"`
}
type Error_xmlrpc struct {
Fault Error_Fault `xml:"fault"`
}
type Error_Fault struct {
Error_Data ErrorData `xml:"value,omitempty"`
}
type ErrorData struct {
Error_Struct Struct `xml:"struct"`
}
type MethodResponse struct {
Params Params `xml:"params"`
}
type Params struct {
Param Param `xml:"param"`
}
type Param struct {
Value Value `xml:"value"`
}
type Value struct {
Array Array `xml:"array"`
}
type Array struct {
Data Data `xml:"data"`
}
type Data struct {
Values []Struct `xml:"value>struct"`
}
type Struct struct {
Members []Member `xml:"member"`
}
type Member struct {
Name string `xml:"name"`
Value InnerValue `xml:"value"`
}
type CustomTime struct {
time.Time
}
type InnerValue struct {
StringValue *string `xml:"string,omitempty"`
IntegerValue *int `xml:"i4,omitempty"`
Int *int `xml:"int,omitempty"`
DateTimeValue *CustomTime `xml:"dateTime.iso8601,omitempty"`
BooleanValue *bool `xml:"bool,omitempty"`
}