Codebase list golang-github-nlopes-slack / 0bc5d87
Add enterprise node to user Jeff Long authored 5 years ago James committed 5 years ago
1 changed file(s) with 34 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
9999
100100 // User contains all the information of a user
101101 type User struct {
102 ID string `json:"id"`
103 TeamID string `json:"team_id"`
104 Name string `json:"name"`
105 Deleted bool `json:"deleted"`
106 Color string `json:"color"`
107 RealName string `json:"real_name"`
108 TZ string `json:"tz,omitempty"`
109 TZLabel string `json:"tz_label"`
110 TZOffset int `json:"tz_offset"`
111 Profile UserProfile `json:"profile"`
112 IsBot bool `json:"is_bot"`
113 IsAdmin bool `json:"is_admin"`
114 IsOwner bool `json:"is_owner"`
115 IsPrimaryOwner bool `json:"is_primary_owner"`
116 IsRestricted bool `json:"is_restricted"`
117 IsUltraRestricted bool `json:"is_ultra_restricted"`
118 IsStranger bool `json:"is_stranger"`
119 IsAppUser bool `json:"is_app_user"`
120 Has2FA bool `json:"has_2fa"`
121 HasFiles bool `json:"has_files"`
122 Presence string `json:"presence"`
123 Locale string `json:"locale"`
102 ID string `json:"id"`
103 TeamID string `json:"team_id"`
104 Name string `json:"name"`
105 Deleted bool `json:"deleted"`
106 Color string `json:"color"`
107 RealName string `json:"real_name"`
108 TZ string `json:"tz,omitempty"`
109 TZLabel string `json:"tz_label"`
110 TZOffset int `json:"tz_offset"`
111 Profile UserProfile `json:"profile"`
112 IsBot bool `json:"is_bot"`
113 IsAdmin bool `json:"is_admin"`
114 IsOwner bool `json:"is_owner"`
115 IsPrimaryOwner bool `json:"is_primary_owner"`
116 IsRestricted bool `json:"is_restricted"`
117 IsUltraRestricted bool `json:"is_ultra_restricted"`
118 IsStranger bool `json:"is_stranger"`
119 IsAppUser bool `json:"is_app_user"`
120 Has2FA bool `json:"has_2fa"`
121 HasFiles bool `json:"has_files"`
122 Presence string `json:"presence"`
123 Locale string `json:"locale"`
124 Enterprise EnterpriseUser `json:"enterprise_user,omitempty"`
124125 }
125126
126127 // UserPresence contains details about a user online status
149150 Image72 string `json:"image_72"`
150151 Image192 string `json:"image_192"`
151152 Image512 string `json:"image_512"`
153 }
154
155 // EnterpriseUser is present when a user is part of Slack Enterprise Grid
156 // https://api.slack.com/types/user#enterprise_grid_user_objects
157 type EnterpriseUser struct {
158 ID string `json:"id"`
159 EnterpriseID string `json:"enterprise_id"`
160 EnterpriseName string `json:"enterprise_name"`
161 IsAdmin bool `json:"is_admin"`
162 IsOwner bool `json:"is_owner"`
163 Teams []string `json:"teams"`
152164 }
153165
154166 type TeamIdentity struct {