slackimport

package
v5.39.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2021 License: AGPL-3.0, Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions struct {
	UpdateActive           func(*model.User, bool) (*model.User, *model.AppError)
	AddUserToChannel       func(*model.User, *model.Channel, bool) (*model.ChannelMember, *model.AppError)
	JoinUserToTeam         func(*model.Team, *model.User, string) (*model.TeamMember, *model.AppError)
	CreateDirectChannel    func(string, string, ...model.ChannelOption) (*model.Channel, *model.AppError)
	CreateGroupChannel     func([]string) (*model.Channel, *model.AppError)
	CreateChannel          func(*model.Channel, bool) (*model.Channel, *model.AppError)
	DoUploadFile           func(time.Time, string, string, string, string, []byte) (*model.FileInfo, *model.AppError)
	GenerateThumbnailImage func(image.Image, string)
	GeneratePreviewImage   func(image.Image, string)
	InvalidateAllCaches    func()
	MaxPostSize            func() int
	PrepareImage           func(fileData []byte) (image.Image, func(), error)
}

Actions provides the actions that needs to be used for import slack data

type SlackImporter

type SlackImporter struct {
	// contains filtered or unexported fields
}

SlackImporter is a service that allows to import slack dumps into mattermost

func New

func New(store store.Store, actions Actions, config *model.Config) *SlackImporter

New creates a new SlackImporter service instance. It receive a store, a set of actions and the current config. It is expected to be used right away and discarded after that

func (*SlackImporter) SlackImport

func (si *SlackImporter) SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL