slackimport

package
v5.28.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: AGPL-3.0, Apache-2.0 Imports: 18 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) (*model.ChannelMember, *model.AppError)
	JoinUserToTeam         func(*model.Team, *model.User, string) *model.AppError
	CreateDirectChannel    func(string, string) (*model.Channel, *model.AppError)
	CreateGroupChannel     func([]string, 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, int, int)
	GeneratePreviewImage   func(image.Image, string, int)
	InvalidateAllCaches    func()
	MaxPostSize            func() int
	PrepareImage           func(fileData []byte) (image.Image, int, int)
}

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