which

package
v2.24.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFinder

type ConfigFinder interface {
	Finds(wd, configFilePath string) []string
}

type ConfigReader added in v2.16.3

type ConfigReader interface {
	Read(configFilePath string, cfg *aqua.Config) error
}

type Controller

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

func New

func New(param *config.Param, configFinder ConfigFinder, configReader ConfigReader, registInstaller RegistryInstaller, rt *runtime.Runtime, osEnv osenv.OSEnv, fs afero.Fs, linker Linker) *Controller

func (*Controller) Which

func (c *Controller) Which(ctx context.Context, logE *logrus.Entry, param *config.Param, exeName string) (*FindResult, error)

type FindResult

type FindResult struct {
	Package        *config.Package
	File           *registry.File
	Config         *aqua.Config
	ExePath        string
	ConfigFilePath string
	EnableChecksum bool
}

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)
}

type MockController

type MockController struct {
	FindResult *FindResult
	Err        error
}

func (*MockController) Which

func (c *MockController) Which(ctx context.Context, logE *logrus.Entry, param *config.Param, exeName string) (*FindResult, error)

type MockMultiController added in v2.14.0

type MockMultiController struct {
	FindResults map[string]*FindResult
}

func (*MockMultiController) Which added in v2.14.0

func (c *MockMultiController) Which(ctx context.Context, logE *logrus.Entry, param *config.Param, exeName string) (*FindResult, error)

type RegistryInstaller added in v2.16.3

type RegistryInstaller interface {
	InstallRegistries(ctx context.Context, logE *logrus.Entry, cfg *aqua.Config, cfgFilePath string, checksums *checksum.Checksums) (map[string]*registry.Config, error)
}

Jump to

Keyboard shortcuts

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