github.com/jlevesy/mattermost-server@v5.3.2-0.20181003190404-7468f35cb0c8+incompatible/app/import_types.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package app 5 6 import "github.com/mattermost/mattermost-server/model" 7 8 // Import Data Models 9 10 type LineImportData struct { 11 Type string `json:"type"` 12 Scheme *SchemeImportData `json:"scheme,omitempty"` 13 Team *TeamImportData `json:"team,omitempty"` 14 Channel *ChannelImportData `json:"channel,omitempty"` 15 User *UserImportData `json:"user,omitempty"` 16 Post *PostImportData `json:"post,omitempty"` 17 DirectChannel *DirectChannelImportData `json:"direct_channel,omitempty"` 18 DirectPost *DirectPostImportData `json:"direct_post,omitempty"` 19 Emoji *EmojiImportData `json:"emoji,omitempty"` 20 Version *int `json:"version,omitempty"` 21 } 22 23 type TeamImportData struct { 24 Name *string `json:"name"` 25 DisplayName *string `json:"display_name"` 26 Type *string `json:"type"` 27 Description *string `json:"description,omitempty"` 28 AllowOpenInvite *bool `json:"allow_open_invite,omitempty"` 29 Scheme *string `json:"scheme,omitempty"` 30 } 31 32 type ChannelImportData struct { 33 Team *string `json:"team"` 34 Name *string `json:"name"` 35 DisplayName *string `json:"display_name"` 36 Type *string `json:"type"` 37 Header *string `json:"header,omitempty"` 38 Purpose *string `json:"purpose,omitempty"` 39 Scheme *string `json:"scheme,omitempty"` 40 } 41 42 type UserImportData struct { 43 ProfileImage *string `json:"profile_image,omitempty"` 44 Username *string `json:"username"` 45 Email *string `json:"email"` 46 AuthService *string `json:"auth_service"` 47 AuthData *string `json:"auth_data,omitempty"` 48 Password *string `json:"password,omitempty"` 49 Nickname *string `json:"nickname"` 50 FirstName *string `json:"first_name"` 51 LastName *string `json:"last_name"` 52 Position *string `json:"position"` 53 Roles *string `json:"roles"` 54 Locale *string `json:"locale"` 55 UseMarkdownPreview *string `json:"feature_enabled_markdown_preview,omitempty"` 56 UseFormatting *string `json:"formatting,omitempty"` 57 ShowUnreadSection *string `json:"show_unread_section,omitempty"` 58 59 Teams *[]UserTeamImportData `json:"teams,omitempty"` 60 61 Theme *string `json:"theme,omitempty"` 62 UseMilitaryTime *string `json:"military_time,omitempty"` 63 CollapsePreviews *string `json:"link_previews,omitempty"` 64 MessageDisplay *string `json:"message_display,omitempty"` 65 ChannelDisplayMode *string `json:"channel_display_mode,omitempty"` 66 TutorialStep *string `json:"tutorial_step,omitempty"` 67 68 NotifyProps *UserNotifyPropsImportData `json:"notify_props,omitempty"` 69 } 70 71 type UserNotifyPropsImportData struct { 72 Desktop *string `json:"desktop"` 73 DesktopSound *string `json:"desktop_sound"` 74 75 Email *string `json:"email"` 76 77 Mobile *string `json:"mobile"` 78 MobilePushStatus *string `json:"mobile_push_status"` 79 80 ChannelTrigger *string `json:"channel"` 81 CommentsTrigger *string `json:"comments"` 82 MentionKeys *string `json:"mention_keys"` 83 } 84 85 type UserTeamImportData struct { 86 Name *string `json:"name"` 87 Roles *string `json:"roles"` 88 Theme *string `json:"theme,omitempty"` 89 Channels *[]UserChannelImportData `json:"channels,omitempty"` 90 } 91 92 type UserChannelImportData struct { 93 Name *string `json:"name"` 94 Roles *string `json:"roles"` 95 NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props,omitempty"` 96 Favorite *bool `json:"favorite,omitempty"` 97 } 98 99 type UserChannelNotifyPropsImportData struct { 100 Desktop *string `json:"desktop"` 101 Mobile *string `json:"mobile"` 102 MarkUnread *string `json:"mark_unread"` 103 } 104 105 type EmojiImportData struct { 106 Name *string `json:"name"` 107 Image *string `json:"image"` 108 } 109 110 type ReactionImportData struct { 111 User *string `json:"user"` 112 CreateAt *int64 `json:"create_at"` 113 EmojiName *string `json:"emoji_name"` 114 } 115 116 type ReplyImportData struct { 117 User *string `json:"user"` 118 119 Message *string `json:"message"` 120 CreateAt *int64 `json:"create_at"` 121 122 FlaggedBy *[]string `json:"flagged_by,omitempty"` 123 Reactions *[]ReactionImportData `json:"reactions,omitempty"` 124 Attachments *[]AttachmentImportData `json:"attachments,omitempty"` 125 } 126 127 type PostImportData struct { 128 Team *string `json:"team"` 129 Channel *string `json:"channel"` 130 User *string `json:"user"` 131 132 Message *string `json:"message"` 133 CreateAt *int64 `json:"create_at"` 134 135 FlaggedBy *[]string `json:"flagged_by,omitempty"` 136 Reactions *[]ReactionImportData `json:"reactions,omitempty"` 137 Replies *[]ReplyImportData `json:"replies,omitempty"` 138 Attachments *[]AttachmentImportData `json:"attachments,omitempty"` 139 } 140 141 type DirectChannelImportData struct { 142 Members *[]string `json:"members"` 143 FavoritedBy *[]string `json:"favorited_by"` 144 145 Header *string `json:"header"` 146 } 147 148 type DirectPostImportData struct { 149 ChannelMembers *[]string `json:"channel_members"` 150 User *string `json:"user"` 151 152 Message *string `json:"message"` 153 CreateAt *int64 `json:"create_at"` 154 155 FlaggedBy *[]string `json:"flagged_by"` 156 Reactions *[]ReactionImportData `json:"reactions"` 157 Replies *[]ReplyImportData `json:"replies"` 158 Attachments *[]AttachmentImportData `json:"attachments"` 159 } 160 161 type SchemeImportData struct { 162 Name *string `json:"name"` 163 DisplayName *string `json:"display_name"` 164 Description *string `json:"description"` 165 Scope *string `json:"scope"` 166 DefaultTeamAdminRole *RoleImportData `json:"default_team_admin_role"` 167 DefaultTeamUserRole *RoleImportData `json:"default_team_user_role"` 168 DefaultChannelAdminRole *RoleImportData `json:"default_channel_admin_role"` 169 DefaultChannelUserRole *RoleImportData `json:"default_channel_user_role"` 170 } 171 172 type RoleImportData struct { 173 Name *string `json:"name"` 174 DisplayName *string `json:"display_name"` 175 Description *string `json:"description"` 176 Permissions *[]string `json:"permissions"` 177 } 178 179 type LineImportWorkerData struct { 180 LineImportData 181 LineNumber int 182 } 183 184 type LineImportWorkerError struct { 185 Error *model.AppError 186 LineNumber int 187 } 188 189 type AttachmentImportData struct { 190 Path *string `json:"path"` 191 }