Documentation
¶
Overview ¶
Package convert implements conversions between different Slackdump formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyChunk = errors.New("missing chunk") ErrNoLocFunction = errors.New("missing location function") )
Functions ¶
This section is empty.
Types ¶
type C2EOption ¶
type C2EOption func(*ChunkToExport)
func WithIncludeAvatars ¶ added in v3.0.4
WithIncludeAvatars sets the IncludeAvataars option.
func WithIncludeFiles ¶
WithIncludeFiles sets the IncludeFiles option.
func WithSrcFileLoc ¶
WithSrcFileLoc sets the SrcFileLoc function.
type ChunkToExport ¶
type ChunkToExport struct {
// contains filtered or unexported fields
}
ChunkToExport is a converter between Chunk and Export formats. Zero value is not usable.
func NewChunkToExport ¶
func (*ChunkToExport) Convert ¶
func (c *ChunkToExport) Convert(ctx context.Context) error
Convert converts the chunk directory contents to the export format. It validates the input parameters.
Restrictions ¶
TODO: Currently, one chunk file per channel is supported. If there are multiple chunk files per channel, the behaviour is undefined, but I expect it to overwrite the previous files.
func (*ChunkToExport) Validate ¶
func (c *ChunkToExport) Validate() error
Validate validates the input parameters.
Click to show internal directories.
Click to hide internal directories.