Documentation ¶
Index ¶
Constants ¶
View Source
const ExtractActivityName = "extract-archive-activity"
Variables ¶
View Source
var ( ErrNotAFile = errors.New("Not a file") ErrInvalidArchive = errors.New("Invalid archive") )
Functions ¶
This section is empty.
Types ¶
type ExtractActivity ¶
type ExtractActivity struct {
// contains filtered or unexported fields
}
func NewExtractActivity ¶
func NewExtractActivity(cfg Config) *ExtractActivity
func (*ExtractActivity) Execute ¶
func (a *ExtractActivity) Execute( ctx context.Context, params *ExtractActivityParams, ) (*ExtractActivityResult, error)
Execute extracts the content of SourcePath to a unique extract directory in DestPath then returns the ExtractPath.
If SourcePath is a directory an ErrNotAFile error is returned. If SourcePath is a file, but not a valid archive, an ErrInvalidArchive error is returned.
type ExtractActivityParams ¶
type ExtractActivityResult ¶
type ExtractActivityResult struct { // ExtractPath is the path of the extracted archive contents. ExtractPath string }
Click to show internal directories.
Click to hide internal directories.