installpackage

package
v2.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const ProxyVersion = "v1.2.5" // renovate: depName=aquaproj/aqua-proxy

Variables

This section is empty.

Functions

func ProxyChecksums

func ProxyChecksums() map[string]string

Types

type CargoPackageInstaller added in v2.8.0

type CargoPackageInstaller interface {
	Install(ctx context.Context, logE *logrus.Entry, crate, version, root string, opts *registry.Cargo) error
}

type CargoPackageInstallerImpl added in v2.8.0

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

func NewCargoPackageInstallerImpl added in v2.8.0

func NewCargoPackageInstallerImpl(exec Executor, cleaner Cleaner) *CargoPackageInstallerImpl

func (*CargoPackageInstallerImpl) Install added in v2.8.0

func (is *CargoPackageInstallerImpl) Install(ctx context.Context, logE *logrus.Entry, crate, version, root string, opts *registry.Cargo) error

type ChecksumCalculator

type ChecksumCalculator interface {
	Calculate(fs afero.Fs, filename, algorithm string) (string, error)
}

type Cleaner added in v2.8.0

type Cleaner interface {
	RemoveAll(name string) (err error)
}

type Cosign

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

type CosignVerifier added in v2.16.3

type CosignVerifier interface {
	Verify(ctx context.Context, logE *logrus.Entry, rt *runtime.Runtime, file *download.File, cos *registry.Cosign, art *template.Artifact, verifiedFilePath string) error
}

type DownloadParam

type DownloadParam struct {
	Package         *config.Package
	Checksums       *checksum.Checksums
	Checksum        *checksum.Checksum
	Dest            string
	Asset           string
	RequireChecksum bool
}

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)
	Exec(ctx context.Context, exePath string, args ...string) (int, error)
	ExecCommand(cmd *exec.Cmd) (int, error)
	ExecWithEnvs(ctx context.Context, exePath string, args, envs []string) (int, error)
}

type GoBuildInstaller added in v2.11.0

type GoBuildInstaller interface {
	Install(ctx context.Context, exePath, exeDir, src string) error
}

type GoBuildInstallerImpl added in v2.11.0

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

func NewGoBuildInstallerImpl added in v2.11.0

func NewGoBuildInstallerImpl(exec Executor) *GoBuildInstallerImpl

func (*GoBuildInstallerImpl) Install added in v2.11.0

func (is *GoBuildInstallerImpl) Install(ctx context.Context, exePath, exeDir, src string) error

type GoInstallInstaller added in v2.7.0

type GoInstallInstaller interface {
	Install(ctx context.Context, path, gobin string) error
}

type GoInstallInstallerImpl added in v2.7.0

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

func NewGoInstallInstallerImpl added in v2.7.0

func NewGoInstallInstallerImpl(exec Executor) *GoInstallInstallerImpl

func (*GoInstallInstallerImpl) Install added in v2.7.0

func (is *GoInstallInstallerImpl) Install(ctx context.Context, path, gobin string) error

type Installer

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

func New

func New(param *config.Param, downloader download.ClientAPI, rt *runtime.Runtime, fs afero.Fs, linker Linker, chkDL download.ChecksumDownloader, chkCalc ChecksumCalculator, unarchiver Unarchiver, cosignVerifier CosignVerifier, slsaVerifier SLSAVerifier, goInstallInstaller GoInstallInstaller, goBuildInstaller GoBuildInstaller, cargoPackageInstaller CargoPackageInstaller) *Installer

func (*Installer) Copy added in v2.16.4

func (is *Installer) Copy(dest, src string) error

func (*Installer) InstallAqua added in v2.16.4

func (is *Installer) InstallAqua(ctx context.Context, logE *logrus.Entry, version string) error

func (*Installer) InstallPackage

func (is *Installer) InstallPackage(ctx context.Context, logE *logrus.Entry, param *ParamInstallPackage) error

func (*Installer) InstallPackages

func (is *Installer) InstallPackages(ctx context.Context, logE *logrus.Entry, param *ParamInstallPackages) error

func (*Installer) InstallProxy

func (is *Installer) InstallProxy(ctx context.Context, logE *logrus.Entry) error

func (*Installer) SetCopyDir added in v2.16.4

func (is *Installer) SetCopyDir(copyDir string)

func (*Installer) WaitExe added in v2.16.4

func (is *Installer) WaitExe(ctx context.Context, logE *logrus.Entry, exePath string) error

type Linker added in v2.16.3

type Linker interface {
	Lstat(s string) (os.FileInfo, error)
	Symlink(dest, src string) error
	Readlink(src string) (string, error)
}

func NewMockLinker added in v2.16.3

func NewMockLinker(fs afero.Fs) Linker

type MockCargoPackageInstaller added in v2.8.0

type MockCargoPackageInstaller struct {
	Err error
}

func (*MockCargoPackageInstaller) Install added in v2.8.0

func (m *MockCargoPackageInstaller) Install(ctx context.Context, logE *logrus.Entry, crate, version, root string, opts *registry.Cargo) error

type MockGoBuildInstaller added in v2.11.0

type MockGoBuildInstaller struct {
	Err error
}

func (*MockGoBuildInstaller) Install added in v2.11.0

func (m *MockGoBuildInstaller) Install(ctx context.Context, exePath, exeDir, src string) error

type MockGoInstallInstaller added in v2.7.0

type MockGoInstallInstaller struct {
	Err error
}

func (*MockGoInstallInstaller) Install added in v2.7.0

func (m *MockGoInstallInstaller) Install(ctx context.Context, path, gobin string) error

type ParamInstallPackage

type ParamInstallPackage struct {
	Pkg             *config.Package
	Checksums       *checksum.Checksums
	RequireChecksum bool
	PolicyConfigs   []*policy.Config
	DisablePolicy   bool
	ConfigFileDir   string
	CosignExePath   string
	Checksum        *checksum.Checksum
}

type ParamInstallPackages

type ParamInstallPackages struct {
	ConfigFilePath  string
	Config          *aqua.Config
	Registries      map[string]*registry.Config
	Tags            map[string]struct{}
	ExcludedTags    map[string]struct{}
	PolicyConfigs   []*policy.Config
	Checksums       *checksum.Checksums
	SkipLink        bool
	RequireChecksum bool
	DisablePolicy   bool
}

type ParamVerifyChecksum

type ParamVerifyChecksum struct {
	ChecksumID      string
	Checksum        *checksum.Checksum
	Checksums       *checksum.Checksums
	Pkg             *config.Package
	AssetName       string
	TempFilePath    string
	SkipSetChecksum bool
}

type SLSAVerifier

type SLSAVerifier interface {
	Verify(ctx context.Context, logE *logrus.Entry, rt *runtime.Runtime, sp *registry.SLSAProvenance, art *template.Artifact, file *download.File, param *slsa.ParamVerify) error
}

type SLSAVerifierInstaller added in v2.16.3

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

type Unarchiver added in v2.16.3

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

Jump to

Keyboard shortcuts

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