-
Notifications
You must be signed in to change notification settings - Fork 2
/
team.go
50 lines (42 loc) · 989 Bytes
/
team.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
package proto
type Team struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
LdapId string `json:"ldapId,omitempty"`
IsSystem bool `json:"isSystem,omitempty"`
Details *TeamDetails `json:"details,omitempty"`
}
type TeamDetails struct {
DetailsCreation
}
type TeamFilter struct {
Name string `json:"name,omitempty"`
LdapId string `json:"ldapId,omitempty"`
IsSystem bool `json:"isSystem,omitempty"`
}
func (p *Team) DeepCompare(a *Team) bool {
if p.Id != a.Id || p.Name != a.Name || p.LdapId != a.LdapId || p.IsSystem != a.IsSystem {
return false
}
return true
}
func NewTeamRequest() Request {
return Request{
Flags: &Flags{},
Team: &Team{},
}
}
func NewTeamFilter() Request {
return Request{
Filter: &Filter{
Team: &TeamFilter{},
},
}
}
func NewTeamResult() Result {
return Result{
Errors: &[]string{},
Teams: &[]Team{},
}
}
// vim: ts=4 sw=4 sts=4 noet fenc=utf-8 ffs=unix