12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package discourse
- // UserResponse - Structure of a discourse user api response// UserResponse - Structure of a discourse user api response
- type UserResponse struct {
- User User `json:"user"`
- Errors []string `json:"errors"`
- ErrorType string `json:"error_type"`
- }
- type UserClass struct {
- UserBadges []interface{} `json:"user_badges"`
- User User `json:"user"`
- }
- // User - A discoruse User
- type User struct {
- ID int `json:"id" schema:"external_id"`
- Username string `json:"username"`
- CanSendPM bool `json:"can_send_private_messages"`
- Moderator bool `json:"moderator"`
- Admin bool `json:"admin"`
- TrustLevel int64 `json:"trust_level"`
- Groups []Group `json:"groups"`
- GroupStr string `schema:"groups"`
- Staged bool `json:"staged"`
- }
- type Group struct {
- ID int64 `json:"id"`
- Automatic bool `json:"automatic"`
- Name string `json:"name"`
- DisplayName string `json:"display_name"`
- UserCount int64 `json:"user_count"`
- MentionableLevel int64 `json:"mentionable_level"`
- MessageableLevel int64 `json:"messageable_level"`
- VisibilityLevel int64 `json:"visibility_level"`
- PrimaryGroup bool `json:"primary_group"`
- Title string `json:"title"`
- GrantTrustLevel int64 `json:"grant_trust_level"`
- IncomingEmail string `json:"incoming_email"`
- HasMessages bool `json:"has_messages"`
- FlairURL string `json:"flair_url"`
- FlairBgColor string `json:"flair_bg_color"`
- FlairColor string `json:"flair_color"`
- BioRaw string `json:"bio_raw"`
- BioCooked string `json:"bio_cooked"`
- BioExcerpt string `json:"bio_excerpt"`
- PublicAdmission bool `json:"public_admission"`
- PublicExit bool `json:"public_exit"`
- AllowMembershipRequests bool `json:"allow_membership_requests"`
- FullName string `json:"full_name"`
- DefaultNotificationLevel int64 `json:"default_notification_level"`
- MembershipRequestTemplate string `json:"membership_request_template"`
- MembersVisibilityLevel int64 `json:"members_visibility_level"`
- CanSeeMembers bool `json:"can_see_members"`
- CanAdminGroup bool `json:"can_admin_group"`
- PublishReadState bool `json:"publish_read_state"`
- }
- type SSOResponse struct {
- ID int
- Username string
- Groups []string
- Admin bool
- Moderator bool
- Nonce string
- }
|