translator

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Translator

type Translator interface {

	// Translate performs the converstion from the input type to a mattermost supported import
	Translate(translation *model.Translation) (outputFilename string, err error)

	// GetOutputArchiveLocalPath returns the local accesible path to the archive file
	GetOutputArchiveLocalPath() (string, error)

	// Cleanup cleans up resources, like local files
	Cleanup() error
}

Translator defines the interface that must be satisfied to allow for converting foreign workspace archives to the Mattermost format

func NewTranslator

func NewTranslator(t *TranslatorOptions) (Translator, error)

NewTranslator returns a Translator capable of translating some foreign workspace archive into a Mattermost backup archive. Currently only Slack is supported.

type TranslatorOptions

type TranslatorOptions struct {
	ArchiveType model.BackupType
	Bucket      string
	WorkingDir  string
}

TranslatorOptions holds the extra data needed to instantiate a concrete Translator

Jump to

Keyboard shortcuts

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