Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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") // ErrWorkingDirNotProvided represents an error when the working directory is not provided ErrWorkingDirNotProvided = errors.New("working directory not provided") // ErrWorkingDirIsNotDirectory represents an error when the working directory is not a directory ErrWorkingDirIsNotDirectory = errors.New("working directory is not a directory") // ErrDescribingWorkingDir represents an error when the working directory cannot be described ErrDescribingWorkingDir = errors.New("an error occurred describing working directory") // ErrFilesystemNotProvided represents an error when the filesystem is not provided ErrFilesystemNotProvided = errors.New("filesystem not provided") // ErrWorkingDirNotExists represents an error when the destination to fetch does not exists ErrWorkingDirNotExists = errors.New("working directory does not exists") // ErrTarExtractorNotProvided is returned when the tar extractor is not provided ErrTarExtractorNotProvided = errors.New("Tar extractor not provided") // ErrSourceCodeFileNotExist is returned when the source code file does not exist ErrSourceCodeFileNotExist = errors.New("source code file does not exist") // ErrOpeningSourceCodeFile is returned when the source code file cannot be opened ErrOpeningSourceCodeFile = errors.New("an error occurred opening source code file") // ErrCreatingGzipReader is returned when the gzip reader cannot be created ErrCreatingGzipReader = errors.New("an error occurred creating gzip reader") // ErrExtractingSourceCodeFile is returned when the source code file cannot be extracted ErrExtractingSourceCodeFile = errors.New("an error occurred extracting source code file") // ErrDescribingProjectReferenece is returned when the project reference cannot be described ErrDescribingProjectReferenece = errors.New("an error occurred describing project reference") // ErrProjectReferenceNotProvided is returned when the project reference is not provided ErrProjectReferenceNotProvided = errors.New("project reference not provided") )
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 MockTarExtractor ¶
MockTarExtractor interface used to extract tar files
func NewMockTarExtractor ¶
func NewMockTarExtractor() *MockTarExtractor
NewMockTarExtractor method creates a new TarGzipFormat struct
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 TarExtractorer ¶
TarExtractorer interface used to extract tar files
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, extractor TarExtractorer, logger repository.Logger) *TarGzipFormat
NewTarGzipFormat method creates a new TarGzipFormat struct