fs

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MPL-2.0 Imports: 13 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyVersion

type AnyVersion struct {
	// Product represents the product (its binary name to look up),
	// conflicts with ExactBinPath
	Product *product.Product

	// ExtraPaths represents additional dir paths to be appended to
	// the default system $PATH, conflicts with ExactBinPath
	ExtraPaths []string

	// ExactBinPath represents exact path to the binary,
	// conflicts with Product and ExtraPaths
	ExactBinPath string
	// contains filtered or unexported fields
}

AnyVersion finds an executable binary of any version either defined by ExactBinPath, or as part of Product.

When ExactBinPath is used, the source is skipped when the binary is not found or accessible/executable.

When Product is used, binary name is looked up within system $PATH and any declared ExtraPaths (which are *appended* to any directories in $PATH). Source is skipped if no binary is found or accessible/executable.

func (*AnyVersion) Find

func (av *AnyVersion) Find(ctx context.Context) (string, error)

func (*AnyVersion) IsSourceImpl

func (*AnyVersion) IsSourceImpl() src.InstallSrcSigil

func (*AnyVersion) SetLogger

func (av *AnyVersion) SetLogger(logger *log.Logger)

func (*AnyVersion) Validate

func (av *AnyVersion) Validate() error

type ExactVersion

type ExactVersion struct {
	Product    product.Product
	Version    *version.Version
	ExtraPaths []string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

ExactVersion finds the first executable binary of the product name which matches the Version within system $PATH and any declared ExtraPaths (which are *appended* to any directories in $PATH)

func (*ExactVersion) Find

func (ev *ExactVersion) Find(ctx context.Context) (string, error)

func (*ExactVersion) IsSourceImpl

func (*ExactVersion) IsSourceImpl() src.InstallSrcSigil

func (*ExactVersion) SetLogger

func (ev *ExactVersion) SetLogger(logger *log.Logger)

func (*ExactVersion) Validate

func (ev *ExactVersion) Validate() error

type Version added in v0.4.0

type Version struct {
	Product     product.Product
	Constraints version.Constraints
	ExtraPaths  []string
	Timeout     time.Duration
	// contains filtered or unexported fields
}

Version finds the first executable binary of the product name which matches the version constraint within system $PATH and any declared ExtraPaths (which are *appended* to any directories in $PATH)

func (*Version) Find added in v0.4.0

func (v *Version) Find(ctx context.Context) (string, error)

func (*Version) IsSourceImpl added in v0.4.0

func (*Version) IsSourceImpl() src.InstallSrcSigil

func (*Version) SetLogger added in v0.4.0

func (v *Version) SetLogger(logger *log.Logger)

func (*Version) Validate added in v0.4.0

func (v *Version) Validate() error

Jump to

Keyboard shortcuts

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