github.com/adacta-ru/mattermost-server@v5.11.1+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  	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  	CreateAt *int64  `json:"create_at"`
   136  
   137  	FlaggedBy   *[]string               `json:"flagged_by,omitempty"`
   138  	Reactions   *[]ReactionImportData   `json:"reactions,omitempty"`
   139  	Replies     *[]ReplyImportData      `json:"replies,omitempty"`
   140  	Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
   141  }
   142  
   143  type DirectChannelImportData struct {
   144  	Members     *[]string `json:"members"`
   145  	FavoritedBy *[]string `json:"favorited_by"`
   146  
   147  	Header *string `json:"header"`
   148  }
   149  
   150  type DirectPostImportData struct {
   151  	ChannelMembers *[]string `json:"channel_members"`
   152  	User           *string   `json:"user"`
   153  
   154  	Message  *string `json:"message"`
   155  	CreateAt *int64  `json:"create_at"`
   156  
   157  	FlaggedBy   *[]string               `json:"flagged_by"`
   158  	Reactions   *[]ReactionImportData   `json:"reactions"`
   159  	Replies     *[]ReplyImportData      `json:"replies"`
   160  	Attachments *[]AttachmentImportData `json:"attachments"`
   161  }
   162  
   163  type SchemeImportData struct {
   164  	Name                    *string         `json:"name"`
   165  	DisplayName             *string         `json:"display_name"`
   166  	Description             *string         `json:"description"`
   167  	Scope                   *string         `json:"scope"`
   168  	DefaultTeamAdminRole    *RoleImportData `json:"default_team_admin_role"`
   169  	DefaultTeamUserRole     *RoleImportData `json:"default_team_user_role"`
   170  	DefaultChannelAdminRole *RoleImportData `json:"default_channel_admin_role"`
   171  	DefaultChannelUserRole  *RoleImportData `json:"default_channel_user_role"`
   172  }
   173  
   174  type RoleImportData struct {
   175  	Name        *string   `json:"name"`
   176  	DisplayName *string   `json:"display_name"`
   177  	Description *string   `json:"description"`
   178  	Permissions *[]string `json:"permissions"`
   179  }
   180  
   181  type LineImportWorkerData struct {
   182  	LineImportData
   183  	LineNumber int
   184  }
   185  
   186  type LineImportWorkerError struct {
   187  	Error      *model.AppError
   188  	LineNumber int
   189  }
   190  
   191  type AttachmentImportData struct {
   192  	Path *string `json:"path"`
   193  }
   194  
   195  type ComparablePreference struct {
   196  	Category string
   197  	Name     string
   198  }