github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/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/v5/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  	DeleteAt           *int64  `json:"delete_at,omitempty"`
    59  
    60  	Teams *[]UserTeamImportData `json:"teams,omitempty"`
    61  
    62  	Theme              *string `json:"theme,omitempty"`
    63  	UseMilitaryTime    *string `json:"military_time,omitempty"`
    64  	CollapsePreviews   *string `json:"link_previews,omitempty"`
    65  	MessageDisplay     *string `json:"message_display,omitempty"`
    66  	ChannelDisplayMode *string `json:"channel_display_mode,omitempty"`
    67  	TutorialStep       *string `json:"tutorial_step,omitempty"`
    68  	EmailInterval      *string `json:"email_interval,omitempty"`
    69  
    70  	NotifyProps *UserNotifyPropsImportData `json:"notify_props,omitempty"`
    71  }
    72  
    73  type UserNotifyPropsImportData struct {
    74  	Desktop      *string `json:"desktop"`
    75  	DesktopSound *string `json:"desktop_sound"`
    76  
    77  	Email *string `json:"email"`
    78  
    79  	Mobile           *string `json:"mobile"`
    80  	MobilePushStatus *string `json:"mobile_push_status"`
    81  
    82  	ChannelTrigger  *string `json:"channel"`
    83  	CommentsTrigger *string `json:"comments"`
    84  	MentionKeys     *string `json:"mention_keys"`
    85  }
    86  
    87  type UserTeamImportData struct {
    88  	Name     *string                  `json:"name"`
    89  	Roles    *string                  `json:"roles"`
    90  	Theme    *string                  `json:"theme,omitempty"`
    91  	Channels *[]UserChannelImportData `json:"channels,omitempty"`
    92  }
    93  
    94  type UserChannelImportData struct {
    95  	Name        *string                           `json:"name"`
    96  	Roles       *string                           `json:"roles"`
    97  	NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props,omitempty"`
    98  	Favorite    *bool                             `json:"favorite,omitempty"`
    99  }
   100  
   101  type UserChannelNotifyPropsImportData struct {
   102  	Desktop    *string `json:"desktop"`
   103  	Mobile     *string `json:"mobile"`
   104  	MarkUnread *string `json:"mark_unread"`
   105  }
   106  
   107  type EmojiImportData struct {
   108  	Name  *string `json:"name"`
   109  	Image *string `json:"image"`
   110  }
   111  
   112  type ReactionImportData struct {
   113  	User      *string `json:"user"`
   114  	CreateAt  *int64  `json:"create_at"`
   115  	EmojiName *string `json:"emoji_name"`
   116  }
   117  
   118  type ReplyImportData struct {
   119  	User *string `json:"user"`
   120  
   121  	Message  *string `json:"message"`
   122  	CreateAt *int64  `json:"create_at"`
   123  
   124  	FlaggedBy   *[]string               `json:"flagged_by,omitempty"`
   125  	Reactions   *[]ReactionImportData   `json:"reactions,omitempty"`
   126  	Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
   127  }
   128  
   129  type PostImportData struct {
   130  	Team    *string `json:"team"`
   131  	Channel *string `json:"channel"`
   132  	User    *string `json:"user"`
   133  
   134  	Message  *string                `json:"message"`
   135  	Props    *model.StringInterface `json:"props"`
   136  	CreateAt *int64                 `json:"create_at"`
   137  
   138  	FlaggedBy   *[]string               `json:"flagged_by,omitempty"`
   139  	Reactions   *[]ReactionImportData   `json:"reactions,omitempty"`
   140  	Replies     *[]ReplyImportData      `json:"replies,omitempty"`
   141  	Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
   142  }
   143  
   144  type DirectChannelImportData struct {
   145  	Members     *[]string `json:"members"`
   146  	FavoritedBy *[]string `json:"favorited_by"`
   147  
   148  	Header *string `json:"header"`
   149  }
   150  
   151  type DirectPostImportData struct {
   152  	ChannelMembers *[]string `json:"channel_members"`
   153  	User           *string   `json:"user"`
   154  
   155  	Message  *string                `json:"message"`
   156  	Props    *model.StringInterface `json:"props"`
   157  	CreateAt *int64                 `json:"create_at"`
   158  
   159  	FlaggedBy   *[]string               `json:"flagged_by"`
   160  	Reactions   *[]ReactionImportData   `json:"reactions"`
   161  	Replies     *[]ReplyImportData      `json:"replies"`
   162  	Attachments *[]AttachmentImportData `json:"attachments"`
   163  }
   164  
   165  type SchemeImportData struct {
   166  	Name                    *string         `json:"name"`
   167  	DisplayName             *string         `json:"display_name"`
   168  	Description             *string         `json:"description"`
   169  	Scope                   *string         `json:"scope"`
   170  	DefaultTeamAdminRole    *RoleImportData `json:"default_team_admin_role"`
   171  	DefaultTeamUserRole     *RoleImportData `json:"default_team_user_role"`
   172  	DefaultChannelAdminRole *RoleImportData `json:"default_channel_admin_role"`
   173  	DefaultChannelUserRole  *RoleImportData `json:"default_channel_user_role"`
   174  	DefaultTeamGuestRole    *RoleImportData `json:"default_team_guest_role"`
   175  	DefaultChannelGuestRole *RoleImportData `json:"default_channel_guest_role"`
   176  }
   177  
   178  type RoleImportData struct {
   179  	Name        *string   `json:"name"`
   180  	DisplayName *string   `json:"display_name"`
   181  	Description *string   `json:"description"`
   182  	Permissions *[]string `json:"permissions"`
   183  }
   184  
   185  type LineImportWorkerData struct {
   186  	LineImportData
   187  	LineNumber int
   188  }
   189  
   190  type LineImportWorkerError struct {
   191  	Error      *model.AppError
   192  	LineNumber int
   193  }
   194  
   195  type AttachmentImportData struct {
   196  	Path *string `json:"path"`
   197  }
   198  
   199  type ComparablePreference struct {
   200  	Category string
   201  	Name     string
   202  }