Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCreatingWorkingDirFolder represents an error creating working directory folder ErrCreatingWorkingDirFolder = errors.New("error creating working directory folder") // ErrCopyingFilesInWorkingDir represents an error copying files in working directory ErrCopyingFilesInWorkingDir = errors.New("error copying files in working directory") // ErrRemovingWorkingDirFolder represents an error removing working directory folder ErrRemovingWorkingDirFolder = errors.New("error removing working directory folder") // ErrProjectNotProvided represents an error when the project is not provided ErrProjectNotProvided = errors.New("project not provided") )
View Source
var ( // ErrTarExtractorNotProvided is returned when the tar extractor is not provided ErrTarExtractorNotProvided = fmt.Errorf("Tar extractor not provided") )
View Source
var ( // ErrWorkingDirNotExists represents an error when the destination to fetch does not exists ErrWorkingDirNotExists = fmt.Errorf("working directory does not exists") )
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory represents the factory for unpacking source code components
func NewFactory ¶
func NewFactory() *Factory
NewFactory creates a new Factory for unpacking source code
func (*Factory) Get ¶
func (f *Factory) Get(name string) repository.SourceCodeUnpacker
Get gets an unpacker by name
func (*Factory) Register ¶
func (f *Factory) Register(name string, unpacker repository.SourceCodeUnpacker)
Register registers a new unpacker
type PlainFormat ¶
type PlainFormat struct {
// contains filtered or unexported fields
}
PlainFormat struct used to unpack local files
func NewPlainFormat ¶
func NewPlainFormat(fs afero.Fs, logger repository.Logger) *PlainFormat
NewPlainFormat method creates a new PlainFormat struct
func (*PlainFormat) Unpack ¶
func (p *PlainFormat) Unpack(project *entity.Project, workingDir string) error
Unpack method prepares the project into the working directory. Unpacking a plain format project does not require any action. The project is already fetched in the working directory. It just checks if the working directory exists.
type TarGzipFormat ¶
type TarGzipFormat struct {
// contains filtered or unexported fields
}
TarGzipFormat struct used to unpack tar.gz files
func NewTarGzipFormat ¶
func NewTarGzipFormat(fs afero.Fs, logger repository.Logger) *TarGzipFormat
NewTarGzipFormat method creates a new TarGzipFormat struct
Click to show internal directories.
Click to hide internal directories.