compression

package
v2.0.0-alpha.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreAllPathsEmpty

func AreAllPathsEmpty(includePaths []string) bool

AreAllPathsEmpty checks if the provided paths are all nonexistent files or empty directories

Types

type ArchiveDependencyChecker

type ArchiveDependencyChecker interface {
	CheckDependencies() bool
}

ArchiveDependencyChecker ...

type ArchiveDependencyCheckerMock

type ArchiveDependencyCheckerMock struct {
	// CheckDependenciesFunc mocks the CheckDependencies method.
	CheckDependenciesFunc func() bool
	// contains filtered or unexported fields
}

ArchiveDependencyCheckerMock is a mock implementation of ArchiveDependencyChecker.

func TestSomethingThatUsesArchiveDependencyChecker(t *testing.T) {

	// make and configure a mocked ArchiveDependencyChecker
	mockedArchiveDependencyChecker := &ArchiveDependencyCheckerMock{
		CheckDependenciesFunc: func() bool {
			panic("mock out the CheckDependencies method")
		},
	}

	// use mockedArchiveDependencyChecker in code that requires ArchiveDependencyChecker
	// and then make assertions.

}

func (*ArchiveDependencyCheckerMock) CheckDependencies

func (mock *ArchiveDependencyCheckerMock) CheckDependencies() bool

CheckDependencies calls CheckDependenciesFunc.

func (*ArchiveDependencyCheckerMock) CheckDependenciesCalls

func (mock *ArchiveDependencyCheckerMock) CheckDependenciesCalls() []struct {
}

CheckDependenciesCalls gets all the calls that were made to CheckDependencies. Check the length with:

len(mockedArchiveDependencyChecker.CheckDependenciesCalls())

type Archiver

type Archiver struct {
	// contains filtered or unexported fields
}

Archiver ...

func NewArchiver

func NewArchiver(logger log.Logger, envRepo env.Repository, archiveDependencyChecker ArchiveDependencyChecker) *Archiver

NewArchiver ...

func (*Archiver) Compress

func (a *Archiver) Compress(archivePath string, includePaths []string) error

Compress creates a compressed archive from the provided files and folders using absolute paths.

func (*Archiver) Decompress

func (a *Archiver) Decompress(archivePath string, destinationDirectory string) error

Decompress takes an archive path and extracts files. This assumes an archive created with absolute file paths.

type DependencyChecker

type DependencyChecker struct {
	// contains filtered or unexported fields
}

DependencyChecker ...

func NewDependencyChecker

func NewDependencyChecker(logger log.Logger, envRepo env.Repository) *DependencyChecker

NewDependencyChecker ...

func (*DependencyChecker) CheckDependencies

func (dc *DependencyChecker) CheckDependencies() bool

CheckDependencies ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL