summaryrefslogtreecommitdiffstats
path: root/app/import_types.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-09-17 15:51:26 +0100
committerGitHub <noreply@github.com>2018-09-17 15:51:26 +0100
commitab99f0656fabed8a62a8c6340be7d538cc7bf8d9 (patch)
treebb68ee1d0c743be23bba470f5d81ef11dc134182 /app/import_types.go
parent5786b0d6d57b90bbb0c262235dd9d19b497b5fae (diff)
downloadchat-ab99f0656fabed8a62a8c6340be7d538cc7bf8d9.tar.gz
chat-ab99f0656fabed8a62a8c6340be7d538cc7bf8d9.tar.bz2
chat-ab99f0656fabed8a62a8c6340be7d538cc7bf8d9.zip
MM-11781: Basic Data Export Command Line. (#9296)
* MM-11781: Basic Data Export Command Line. * ChannelStore new unit tests. * TeamStore new unit tests. * Unit test for new UserStore function. * Unit tests for post store new methods. * Review fixes. * Fix duplicate command name.
Diffstat (limited to 'app/import_types.go')
-rw-r--r--app/import_types.go80
1 files changed, 40 insertions, 40 deletions
diff --git a/app/import_types.go b/app/import_types.go
index 168d43bab..1a2e44018 100644
--- a/app/import_types.go
+++ b/app/import_types.go
@@ -9,24 +9,24 @@ import "github.com/mattermost/mattermost-server/model"
type LineImportData struct {
Type string `json:"type"`
- Scheme *SchemeImportData `json:"scheme"`
- Team *TeamImportData `json:"team"`
- Channel *ChannelImportData `json:"channel"`
- User *UserImportData `json:"user"`
- Post *PostImportData `json:"post"`
- DirectChannel *DirectChannelImportData `json:"direct_channel"`
- DirectPost *DirectPostImportData `json:"direct_post"`
- Emoji *EmojiImportData `json:"emoji"`
- Version *int `json:"version"`
+ Scheme *SchemeImportData `json:"scheme,omitempty"`
+ Team *TeamImportData `json:"team,omitempty"`
+ Channel *ChannelImportData `json:"channel,omitempty"`
+ User *UserImportData `json:"user,omitempty"`
+ Post *PostImportData `json:"post,omitempty"`
+ DirectChannel *DirectChannelImportData `json:"direct_channel,omitempty"`
+ DirectPost *DirectPostImportData `json:"direct_post,omitempty"`
+ Emoji *EmojiImportData `json:"emoji,omitempty"`
+ Version *int `json:"version,omitempty"`
}
type TeamImportData struct {
Name *string `json:"name"`
DisplayName *string `json:"display_name"`
Type *string `json:"type"`
- Description *string `json:"description"`
- AllowOpenInvite *bool `json:"allow_open_invite"`
- Scheme *string `json:"scheme"`
+ Description *string `json:"description,omitempty"`
+ AllowOpenInvite *bool `json:"allow_open_invite,omitempty"`
+ Scheme *string `json:"scheme,omitempty"`
}
type ChannelImportData struct {
@@ -34,38 +34,38 @@ type ChannelImportData struct {
Name *string `json:"name"`
DisplayName *string `json:"display_name"`
Type *string `json:"type"`
- Header *string `json:"header"`
- Purpose *string `json:"purpose"`
- Scheme *string `json:"scheme"`
+ Header *string `json:"header,omitempty"`
+ Purpose *string `json:"purpose,omitempty"`
+ Scheme *string `json:"scheme,omitempty"`
}
type UserImportData struct {
- ProfileImage *string `json:"profile_image"`
+ ProfileImage *string `json:"profile_image,omitempty"`
Username *string `json:"username"`
Email *string `json:"email"`
AuthService *string `json:"auth_service"`
- AuthData *string `json:"auth_data"`
- Password *string `json:"password"`
+ AuthData *string `json:"auth_data,omitempty"`
+ Password *string `json:"password,omitempty"`
Nickname *string `json:"nickname"`
FirstName *string `json:"first_name"`
LastName *string `json:"last_name"`
Position *string `json:"position"`
Roles *string `json:"roles"`
Locale *string `json:"locale"`
- UseMarkdownPreview *string `json:"feature_enabled_markdown_preview"`
- UseFormatting *string `json:"formatting"`
- ShowUnreadSection *string `json:"show_unread_section"`
+ UseMarkdownPreview *string `json:"feature_enabled_markdown_preview,omitempty"`
+ UseFormatting *string `json:"formatting,omitempty"`
+ ShowUnreadSection *string `json:"show_unread_section,omitempty"`
- Teams *[]UserTeamImportData `json:"teams"`
+ Teams *[]UserTeamImportData `json:"teams,omitempty"`
- Theme *string `json:"theme"`
- UseMilitaryTime *string `json:"military_time"`
- CollapsePreviews *string `json:"link_previews"`
- MessageDisplay *string `json:"message_display"`
- ChannelDisplayMode *string `json:"channel_display_mode"`
- TutorialStep *string `json:"tutorial_step"`
+ Theme *string `json:"theme,omitempty"`
+ UseMilitaryTime *string `json:"military_time,omitempty"`
+ CollapsePreviews *string `json:"link_previews,omitempty"`
+ MessageDisplay *string `json:"message_display,omitempty"`
+ ChannelDisplayMode *string `json:"channel_display_mode,omitempty"`
+ TutorialStep *string `json:"tutorial_step,omitempty"`
- NotifyProps *UserNotifyPropsImportData `json:"notify_props"`
+ NotifyProps *UserNotifyPropsImportData `json:"notify_props,omitempty"`
}
type UserNotifyPropsImportData struct {
@@ -85,15 +85,15 @@ type UserNotifyPropsImportData struct {
type UserTeamImportData struct {
Name *string `json:"name"`
Roles *string `json:"roles"`
- Theme *string `json:"theme"`
- Channels *[]UserChannelImportData `json:"channels"`
+ Theme *string `json:"theme,omitempty"`
+ Channels *[]UserChannelImportData `json:"channels,omitempty"`
}
type UserChannelImportData struct {
Name *string `json:"name"`
Roles *string `json:"roles"`
- NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props"`
- Favorite *bool `json:"favorite"`
+ NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props,omitempty"`
+ Favorite *bool `json:"favorite,omitempty"`
}
type UserChannelNotifyPropsImportData struct {
@@ -119,9 +119,9 @@ type ReplyImportData struct {
Message *string `json:"message"`
CreateAt *int64 `json:"create_at"`
- FlaggedBy *[]string `json:"flagged_by"`
- Reactions *[]ReactionImportData `json:"reactions"`
- Attachments *[]AttachmentImportData `json:"attachments"`
+ FlaggedBy *[]string `json:"flagged_by,omitempty"`
+ Reactions *[]ReactionImportData `json:"reactions,omitempty"`
+ Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
}
type PostImportData struct {
@@ -132,10 +132,10 @@ type PostImportData struct {
Message *string `json:"message"`
CreateAt *int64 `json:"create_at"`
- FlaggedBy *[]string `json:"flagged_by"`
- Reactions *[]ReactionImportData `json:"reactions"`
- Replies *[]ReplyImportData `json:"replies"`
- Attachments *[]AttachmentImportData `json:"attachments"`
+ FlaggedBy *[]string `json:"flagged_by,omitempty"`
+ Reactions *[]ReactionImportData `json:"reactions,omitempty"`
+ Replies *[]ReplyImportData `json:"replies,omitempty"`
+ Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
}
type DirectChannelImportData struct {