-
Notifications
You must be signed in to change notification settings - Fork 5
/
users.models.go
209 lines (198 loc) · 12.1 KB
/
users.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
package taigo
import "time"
// UsersQueryParams holds fields to be used as URL query parameters to filter the queried objects
type UsersQueryParams struct {
Project int `url:"project,omitempty"`
}
// User represents User detail | https://taigaio.github.io/taiga-doc/dist/api.html#object-user-detail
type User struct {
authToken string // internal; non-standard
AcceptedTerms bool `json:"accepted_terms,omitempty"`
BigPhoto string `json:"big_photo,omitempty"`
Bio string `json:"bio,omitempty"`
Color string `json:"color,omitempty"`
DateJoined time.Time `json:"date_joined,omitempty"`
Email string `json:"email,omitempty"`
FullName string `json:"full_name,omitempty"`
FullNameDisplay string `json:"full_name_display,omitempty"`
GravatarID string `json:"gravatar_id,omitempty"`
ID int `json:"id,omitempty"`
IsActive bool `json:"is_active,omitempty"`
Lang string `json:"lang,omitempty"`
MaxMembershipsPrivateProjects int `json:"max_memberships_private_projects,omitempty"`
MaxMembershipsPublicProjects int `json:"max_memberships_public_projects,omitempty"`
MaxPrivateProjects int `json:"max_private_projects,omitempty"`
MaxPublicProjects int `json:"max_public_projects,omitempty"`
Photo string `json:"photo,omitempty"`
ReadNewTerms bool `json:"read_new_terms,omitempty"`
Roles []string `json:"roles,omitempty"`
Theme string `json:"theme,omitempty"`
Timezone string `json:"timezone,omitempty"`
TotalPrivateProjects int `json:"total_private_projects,omitempty"`
TotalPublicProjects int `json:"total_public_projects,omitempty"`
Username string `json:"username,omitempty"`
UUID string `json:"uuid,omitempty"`
}
// GetToken returns the token string embedded into User
func (u User) GetToken() string {
return u.authToken
}
// Liked represents Liked | https://taigaio.github.io/taiga-doc/dist/api.html#object-liked-detail
type Liked struct {
AssignedTo int `json:"assigned_to,omitempty"`
AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info,omitempty"`
CreatedDate time.Time `json:"created_date,omitempty"`
Description string `json:"description,omitempty"`
ID int `json:"id,omitempty"`
IsFan bool `json:"is_fan,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
IsWatcher bool `json:"is_watcher,omitempty"`
LogoSmallURL string `json:"logo_small_url,omitempty"`
Name string `json:"name,omitempty"`
Project string `json:"project,omitempty"`
ProjectBlockedCode string `json:"project_blocked_code,omitempty"`
ProjectIsPrivate bool `json:"project_is_private,omitempty"`
ProjectName string `json:"project_name,omitempty"`
ProjectSlug string `json:"project_slug,omitempty"`
Ref int `json:"ref,omitempty"`
Slug string `json:"slug,omitempty"`
Status int `json:"status,omitempty"`
StatusColor string `json:"status_color,omitempty"`
Subject string `json:"subject,omitempty"`
TagsColors []TagsColors `json:"tags_colors,omitempty"`
TotalFans int `json:"total_fans,omitempty"`
TotalWatchers int `json:"total_watchers,omitempty"`
Type string `json:"type,omitempty"`
}
// Voted represents Voted | https://taigaio.github.io/taiga-doc/dist/api.html#object-voted-detail
type Voted struct {
AssignedTo int `json:"assigned_to,omitempty"`
AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info,omitempty"`
CreatedDate time.Time `json:"created_date,omitempty"`
Description string `json:"description,omitempty"`
ID int `json:"id,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
IsVoter bool `json:"is_voter,omitempty"`
IsWatcher bool `json:"is_watcher,omitempty"`
LogoSmallURL string `json:"logo_small_url,omitempty"`
Name string `json:"name,omitempty"`
Project int `json:"project,omitempty"`
ProjectBlockedCode string `json:"project_blocked_code,omitempty"`
ProjectIsPrivate bool `json:"project_is_private,omitempty"`
ProjectName string `json:"project_name,omitempty"`
ProjectSlug string `json:"project_slug,omitempty"`
Ref int `json:"ref,omitempty"`
Slug string `json:"slug,omitempty"`
Status string `json:"status,omitempty"`
StatusColor string `json:"status_color,omitempty"`
Subject string `json:"subject,omitempty"`
TagsColors []TagsColors `json:"tags_colors,omitempty"`
TotalVoters int `json:"total_voters,omitempty"`
TotalWatchers int `json:"total_watchers,omitempty"`
Type string `json:"type,omitempty"`
}
// UserStatsDetail represents User stats detail | https://taigaio.github.io/taiga-doc/dist/api.html#object-user-stats-detail
type UserStatsDetail struct {
Roles []string `json:"roles,omitempty"`
TotalNumClosedUserstories int `json:"total_num_closed_userstories,omitempty"`
TotalNumContacts int `json:"total_num_contacts,omitempty"`
TotalNumProjects int `json:"total_num_projects,omitempty"`
}
// UserContactDetail represents User contact detail | https://taigaio.github.io/taiga-doc/dist/api.html#object-contact-detail
type UserContactDetail struct {
BigPhoto string `json:"big_photo,omitempty"`
Bio string `json:"bio,omitempty"`
Color string `json:"color,omitempty"`
FullName string `json:"full_name,omitempty"`
FullNameDisplay string `json:"full_name_display,omitempty"`
GravatarID string `json:"gravatar_id,omitempty"`
ID int `json:"id,omitempty"`
IsActive bool `json:"is_active,omitempty"`
Lang string `json:"lang,omitempty"`
Photo string `json:"photo,omitempty"`
Roles []string `json:"roles,omitempty"`
Theme string `json:"theme,omitempty"`
Timezone string `json:"timezone,omitempty"`
Username string `json:"username,omitempty"`
}
// Watched represents Watched | https://taigaio.github.io/taiga-doc/dist/api.html#object-watched-detail
type Watched struct {
AssignedTo int `json:"assigned_to,omitempty"`
AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info,omitempty"`
CreatedDate time.Time `json:"created_date,omitempty"`
Description string `json:"description,omitempty"`
ID int `json:"id,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
IsVoter bool `json:"is_voter,omitempty"`
IsWatcher bool `json:"is_watcher,omitempty"`
LogoSmallURL string `json:"logo_small_url,omitempty"`
Name string `json:"name,omitempty"`
Project int `json:"project,omitempty"`
ProjectBlockedCode string `json:"project_blocked_code,omitempty"`
ProjectIsPrivate bool `json:"project_is_private,omitempty"`
ProjectName string `json:"project_name,omitempty"`
ProjectSlug string `json:"project_slug,omitempty"`
Ref int `json:"ref,omitempty"`
Slug string `json:"slug,omitempty"`
Status string `json:"status,omitempty"`
StatusColor string `json:"status_color,omitempty"`
Subject string `json:"subject,omitempty"`
TagsColors []TagsColors `json:"tags_colors,omitempty"`
TotalVoters int `json:"total_voters,omitempty"`
TotalWatchers int `json:"total_watchers,omitempty"`
Type string `json:"type,omitempty"`
}
// UserWatched => https://taigaio.github.io/taiga-doc/dist/api.html#object-watched-detail
type UserWatched struct {
AssignedTo int `json:"assigned_to"`
AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info"`
CreatedDate time.Time `json:"created_date"`
Description string `json:"description"`
ID int `json:"id"`
IsPrivate bool `json:"is_private"`
IsVoter bool `json:"is_voter"`
IsWatcher bool `json:"is_watcher"`
LogoSmallURL string `json:"logo_small_url"`
Name string `json:"name"`
Project int `json:"project"`
ProjectBlockedCode string `json:"project_blocked_code"`
ProjectIsPrivate bool `json:"project_is_private"`
ProjectName string `json:"project_name"`
ProjectSlug string `json:"project_slug"`
Ref int `json:"ref"`
Slug string `json:"slug"`
Status string `json:"status"`
StatusColor string `json:"status_color"`
Subject string `json:"subject"`
TagsColors []TagsColors `json:"tags_colors,omitempty"`
TotalVoters int `json:"total_voters"`
TotalWatchers int `json:"total_watchers"`
Type string `json:"type"`
}
// UserLiked => https://taigaio.github.io/taiga-doc/dist/api.html#object-liked-detail
type UserLiked struct {
AssignedTo int `json:"assigned_to"`
AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info"`
CreatedDate time.Time `json:"created_date"`
Description string `json:"description"`
ID int `json:"id"`
IsFan bool `json:"is_fan"`
IsPrivate bool `json:"is_private"`
IsWatcher bool `json:"is_watcher"`
LogoSmallURL string `json:"logo_small_url"`
Name string `json:"name"`
Project int `json:"project"`
ProjectBlockedCode string `json:"project_blocked_code"`
ProjectIsPrivate bool `json:"project_is_private"`
ProjectName string `json:"project_name"`
ProjectSlug string `json:"project_slug"`
Ref int `json:"ref"`
Slug string `json:"slug"`
Status int `json:"status"`
StatusColor string `json:"status_color"`
Subject string `json:"subject"`
TagsColors []TagsColors `json:"tags_colors,omitempty"`
TotalFans int `json:"total_fans"`
TotalWatchers int `json:"total_watchers"`
Type string `json:"type"`
}