Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmptyChunk = errors.New("missing chunk") ErrNoLocFunction = errors.New("missing location function") )
Functions ¶
This section is empty.
Types ¶
type DumpConverter ¶
type DumpConverter struct {
// contains filtered or unexported fields
}
func NewToDump ¶
func NewToDump(src source.Sourcer, trg fsadapter.FS, opts ...DumpOption) *DumpConverter
NewToDump creates a new dump converter.
type DumpOption ¶
type DumpOption func(*DumpConverter)
func DumpWithIncludeFiles ¶
func DumpWithIncludeFiles(b bool) DumpOption
func DumpWithLogger ¶
func DumpWithLogger(log *slog.Logger) DumpOption
type FileCopier ¶
type FileCopier struct {
// contains filtered or unexported fields
}
func NewFileCopier ¶
func (*FileCopier) Copy ¶
Copy iterates through the files in the message and copies them to the target directory. Source file location is determined by calling the srcFileLoc function, joined with the chunk directory name. target file location — by calling trgFileLoc function, and is relative to the target fsadapter root.
type Option ¶
type Option func(*options)
func WithIgnoreCopyErrors ¶
func WithIncludeAvatars ¶
WithIncludeAvatars sets the IncludeAvatars option.
func WithIncludeFiles ¶
WithIncludeFiles sets the IncludeFiles option.
type SourceEncoder ¶
type SourceEncoder struct {
// contains filtered or unexported fields
}
SourceEncoder allows to convert any source to a chunked format.
func NewSourceEncoder ¶
type Target ¶
type Target interface {
// Convert should convert the data for the single channel and save it to
// the target format.
transform.Converter
// Users should convert and write users.
Users(ctx context.Context, uu []slack.User) error
// Channels should converts and write channels.
Channels(ctx context.Context, uu []slack.Channel) error
// WorkspaceInfo writes workspace info.
WorkspaceInfo(ctx context.Context, wi *slack.AuthTestResponse) error
}
Target is the interface for writing the target format.
type ToExport ¶
type ToExport struct {
// contains filtered or unexported fields
}
ToExport is a converter between Chunk and Export formats. Zero value is not usable.
func NewToExport ¶
NewToExport returns the converter from any source to export format. src is the Source to be converted (e.g. chunk or database), trgfs is the target FS adapter where files and data will be written. By default, the converter does not include files and avatars. The default storage format for both source and destination is Mattermost, use functional options to configure this behaviour.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock_convert is a generated GoMock package.
|
Package mock_convert is a generated GoMock package. |
|
fileproc
Package fileproc is the file processor that can be used in conjunction with the transformer.
|
Package fileproc is the file processor that can be used in conjunction with the transformer. |