unarchive

package
v2.34.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 11 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 (d *Decompressor) Unarchive(_ context.Context, _ *logrus.Entry, src *File) error

type DownloadedFile added in v2.7.1

type DownloadedFile interface {
	Path() (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 (u *MockUnarchiver) Unarchive(ctx context.Context, logE *logrus.Entry, src *File, dest string) error

type Unarchiver

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

func New

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

func (*Unarchiver) Unarchive

func (u *Unarchiver) 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