installpackage

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const ProxyVersion = "v1.2.2" // renovate: depName=khulnasoftproj/khulnasoft-proxy

Variables

This section is empty.

Functions

func ProxyChecksums

func ProxyChecksums() map[string]string

Types

type CargoPackageInstaller

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

type CargoPackageInstallerImpl

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

func NewCargoPackageInstallerImpl

func NewCargoPackageInstallerImpl(exec Executor, cleaner Cleaner) *CargoPackageInstallerImpl

func (*CargoPackageInstallerImpl) Install

func (inst *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

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

type Cosign

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

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

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

type GoBuildInstallerImpl

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

func NewGoBuildInstallerImpl

func NewGoBuildInstallerImpl(exec Executor) *GoBuildInstallerImpl

func (*GoBuildInstallerImpl) Install

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

type GoInstallInstaller

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

type GoInstallInstallerImpl

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

func NewGoInstallInstallerImpl

func NewGoInstallInstallerImpl(exec Executor) *GoInstallInstallerImpl

func (*GoInstallInstallerImpl) Install

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

type Installer

type Installer interface {
	InstallPackage(ctx context.Context, logE *logrus.Entry, param *ParamInstallPackage) error
	InstallPackages(ctx context.Context, logE *logrus.Entry, param *ParamInstallPackages) error
	InstallProxy(ctx context.Context, logE *logrus.Entry) error
}

type InstallerImpl

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

func New

func New(param *config.Param, downloader download.ClientAPI, rt *runtime.Runtime, fs afero.Fs, linker domain.Linker, chkDL download.ChecksumDownloader, chkCalc ChecksumCalculator, unarchiver unarchive.Unarchiver, policyChecker *policy.Checker, cosignVerifier cosign.Verifier, slsaVerifier slsa.Verifier, goInstallInstaller GoInstallInstaller, goBuildInstaller GoBuildInstaller, cargoPackageInstaller CargoPackageInstaller) *InstallerImpl

func (*InstallerImpl) Copy

func (inst *InstallerImpl) Copy(dest, src string) error

func (*InstallerImpl) InstallKhulnasoft

func (inst *InstallerImpl) InstallKhulnasoft(ctx context.Context, logE *logrus.Entry, version string) error

func (*InstallerImpl) InstallPackage

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

func (*InstallerImpl) InstallPackages

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

func (*InstallerImpl) InstallProxy

func (inst *InstallerImpl) InstallProxy(ctx context.Context, logE *logrus.Entry) error

func (*InstallerImpl) SetCopyDir

func (inst *InstallerImpl) SetCopyDir(copyDir string)

func (*InstallerImpl) WaitExe

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

type MockCargoPackageInstaller

type MockCargoPackageInstaller struct {
	Err error
}

func (*MockCargoPackageInstaller) Install

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

type MockGoBuildInstaller

type MockGoBuildInstaller struct {
	Err error
}

func (*MockGoBuildInstaller) Install

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

type MockGoInstallInstaller

type MockGoInstallInstaller struct {
	Err error
}

func (*MockGoInstallInstaller) Install

func (mock *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          *khulnasoft.Config
	Registries      map[string]*registry.Config
	Tags            map[string]struct{}
	ExcludedTags    map[string]struct{}
	PolicyConfigs   []*policy.Config
	Checksums       *checksum.Checksums
	SkipLink        bool
	RequireChecksum 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 struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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