unarchive

package
v2.8.0-2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FormatDMG string = "dmg"
View Source
const FormatPKG string = "pkg"

Variables

This section is empty.

Functions

func IsUnarchived

func IsUnarchived(archiveType, assetName string) bool

Types

type Decompressor

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

func (*Decompressor) Unarchive

func (decompressor *Decompressor) Unarchive(ctx context.Context, logE *logrus.Entry, src *File) error

type DownloadedFile added in v2.7.1

type DownloadedFile interface {
	GetPath() (string, error)
	ReadLast() (io.ReadCloser, error)
	Wrap(w io.Writer) io.Writer
}

type Executor

type Executor interface {
	HdiutilAttach(ctx context.Context, dmgPath, mountPoint string) (int, error)
	HdiutilDetach(ctx context.Context, mountPath string) (int, error)
	UnarchivePkg(ctx context.Context, pkgFilePath, dest string) (int, error)
}

type File

type File struct {
	Body     DownloadedFile
	Filename string
	Type     string
}

type MockUnarchiver

type MockUnarchiver struct {
	Err error
}

func (*MockUnarchiver) Unarchive

func (unarchiver *MockUnarchiver) Unarchive(ctx context.Context, logE *logrus.Entry, src *File, dest string) error

type Unarchiver

type Unarchiver interface {
	Unarchive(ctx context.Context, logE *logrus.Entry, src *File, dest string) error
}

type UnarchiverImpl

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

func New

func New(executor Executor, fs afero.Fs) *UnarchiverImpl

func (*UnarchiverImpl) Unarchive

func (unarchiver *UnarchiverImpl) Unarchive(ctx context.Context, logE *logrus.Entry, src *File, dest string) error

Jump to

Keyboard shortcuts

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