-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusergroup_models.go
81 lines (78 loc) · 2.9 KB
/
usergroup_models.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
package jumpcloud
// UserGroup is sensitive due to the null values being empty structs when calling the API
type UserGroup struct {
Attributes *Attributes `json:"attributes,omitempty"`
Description string `json:"description,omitempty"`
Email string `json:"email,omitempty"`
ID string `json:"id,omitempty"`
MemberQuery *MemberQuery `json:"memberQuery,omitempty"`
MemberQueryExemptions *[]MemberQueryExemptions `json:"memberQueryExemptions,omitempty"`
MemberSuggestionsNotify bool `json:"memberSuggestionsNotify,omitempty"`
MembershipMethod string `json:"membershipMethod,omitempty"`
Name string `json:"name,omitempty"`
SuggestionCounts *SuggestionCounts `json:"suggestionCounts,omitempty"`
Type string `json:"type,omitempty"`
}
type Sudo struct {
Enabled bool `json:"enabled,omitempty"`
WithoutPassword bool `json:"withoutPassword,omitempty"`
}
type LdapGroups struct {
Name string `json:"name,omitempty"`
}
type PosixGroups struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
type Reply struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
}
type Radius struct {
Reply []Reply `json:"reply,omitempty"`
}
type Attributes struct {
Sudo *Sudo `json:"sudo,omitempty"`
LdapGroups *[]LdapGroups `json:"ldapGroups,omitempty"`
PosixGroups *[]PosixGroups `json:"posixGroups,omitempty"`
Radius *Radius `json:"radius,omitempty"`
SambaEnabled bool `json:"sambaEnabled,omitempty"`
}
type Filters struct {
Field string `json:"field,omitempty"`
Operator string `json:"operator,omitempty"`
Value string `json:"value,omitempty"`
}
type MemberQuery struct {
QueryType string `json:"queryType,omitempty"`
Filters *[]Filters `json:"filters,omitempty"`
}
type MemberQueryExemptions struct {
Attributes *Attributes `json:"attributes,omitempty"`
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
}
type SuggestionCounts struct {
Add int `json:"add,omitempty"`
Remove int `json:"remove,omitempty"`
Total int `json:"total,omitempty"`
}
// UserGroups is a slice of UserGroup
type UserGroups []UserGroup
// GroupMembership is a slice of struct containing members of a group
type GroupMembership []struct {
Attributes struct {
} `json:"attributes,omitempty"`
From struct {
Attributes struct {
} `json:"attributes,omitempty"`
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
} `json:"from,omitempty"`
To struct {
Attributes struct {
} `json:"attributes,omitempty"`
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
} `json:"to,omitempty"`
}