forked from RocketChat/Rocket.Chat.Go.SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.go
35 lines (31 loc) · 1.06 KB
/
user.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
package models
type User struct {
ID string `json:"_id"`
Name string `json:"name"`
UserName string `json:"username"`
Status string `json:"status"`
Token string `json:"token"`
TokenExpires int64 `json:"tokenExpires"`
}
type CreateUserRequest struct {
Name string `json:"name"`
Email string `json:"email"`
Password string `json:"password"`
Username string `json:"username"`
Roles []string `json:"roles,omitempty"`
CustomFields map[string]string `json:"customFields,omitempty"`
}
type UpdateUserRequest struct {
UserID string `json:"userId"`
Data struct {
Name string `json:"name"`
Email string `json:"email"`
Password string `json:"password"`
Username string `json:"username"`
CustomFields map[string]string `json:"customFields,omitempty"`
} `json:"data"`
}
type SetUserStatus struct {
Message string `json:"message,omitempty"`
Status string `json:"status,omitempty"`
}