Documentation
¶
Index ¶
- func Command(ctx context.Context, root, name string, args ...string) error
- func CommandOutput(ctx context.Context, root, name string, args ...string) ([]byte, error)
- func IsMissingTool(err error) bool
- func IsNotWirable(err error) bool
- func IsToolUnavailable(err error) bool
- func NotWirable(reason string) error
- func NotWirableReason(err error) string
- func RequireTool(ctx context.Context, ecosystem string, variant Variant) error
- func VendorSourcePath(exp Export, locked Locked) string
- func VersionAtLeast(versionText, minimum string) bool
- type Adapter
- type Change
- type Dependency
- type Export
- type Finding
- type Locked
- type MissingToolError
- type NotWirableError
- type ToolRequirement
- type ToolStatus
- type ToolVersionError
- type Variant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandOutput ¶
func IsMissingTool ¶
func IsNotWirable ¶
func IsToolUnavailable ¶
func NotWirable ¶
func NotWirableReason ¶
func VendorSourcePath ¶ added in v1.2.0
VendorSourcePath returns the consumer-root-relative directory that contains an export. Copy vendors already materialise dependency.path as their root; submodules retain it.
func VersionAtLeast ¶
Types ¶
type Adapter ¶
type Adapter interface {
Ecosystem() string
Detect(root string) (bool, Variant, error)
Wire(ctx context.Context, root string, dep Dependency, exp Export, locked Locked) (Change, error)
Unwire(ctx context.Context, root string, dep Dependency, exp Export) (Change, error)
Refresh(ctx context.Context, root string, dep Dependency, exp Export, locked Locked) error
Drift(ctx context.Context, root string, dep Dependency, exp Export, locked Locked) ([]Finding, error)
}
type Dependency ¶
type Dependency = manifest.Dependency
type Locked ¶
type Locked = manifest.LockedDependency
type MissingToolError ¶
type MissingToolError struct{ Requirement ToolRequirement }
func (MissingToolError) Error ¶
func (e MissingToolError) Error() string
type NotWirableError ¶
type NotWirableError struct{ Reason string }
func (NotWirableError) Error ¶
func (e NotWirableError) Error() string
type ToolRequirement ¶
type ToolRequirement struct {
Ecosystem string `json:"ecosystem"`
Command string `json:"command"`
VersionArg []string `json:"versionArgs"`
Minimum string `json:"minimum,omitempty"`
Install string `json:"install"`
}
func GitTool ¶
func GitTool() ToolRequirement
func ToolFor ¶
func ToolFor(ecosystem string, variant Variant) ToolRequirement
type ToolStatus ¶
type ToolStatus struct {
ToolRequirement
Found bool `json:"found"`
Path string `json:"path,omitempty"`
Version string `json:"version,omitempty"`
Ready bool `json:"ready"`
}
func InspectTool ¶
func InspectTool(ctx context.Context, requirement ToolRequirement) ToolStatus
type ToolVersionError ¶
type ToolVersionError struct {
Requirement ToolRequirement
Version string
}
func (ToolVersionError) Error ¶
func (e ToolVersionError) Error() string
Click to show internal directories.
Click to hide internal directories.