Documentation
¶
Index ¶
- type Adapter
- func (a Adapter) Capability(root string, dep adapter.Dependency, exp adapter.Export) error
- func (Adapter) Detect(root string) (bool, adapter.Variant, error)
- func (Adapter) Drift(_ context.Context, root string, dep adapter.Dependency, exp adapter.Export, ...) ([]adapter.Finding, error)
- func (Adapter) Ecosystem() string
- func (a Adapter) Inspect(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, ...) ([]adapter.Finding, error)
- func (a Adapter) Pull(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, ...) (adapter.Change, error)
- func (a Adapter) Remove(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, ...) (adapter.Change, error)
- func (Adapter) Unwire(ctx context.Context, root string, _ adapter.Dependency, exp adapter.Export) (adapter.Change, error)
- func (a Adapter) Wire(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, ...) (adapter.Change, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
ResolveVersion func(context.Context, string, string, string) (string, error)
Download func(context.Context, string, string) error
Materialized func(context.Context, string, string) (bool, string, error)
}
func (Adapter) Capability ¶
Capability performs a read-only check of the consumer and source shape. A NotWirable result is reserved for Git URLs that cannot be represented as a Go module source; missing consumer state remains an ordinary error.
func (Adapter) Inspect ¶
func (a Adapter) Inspect(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, locked adapter.Locked) ([]adapter.Finding, error)
Inspect validates the declaration first, then asks the Go toolchain in offline/read-only mode where the selected module is materialized.
func (Adapter) Pull ¶
func (a Adapter) Pull(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, locked adapter.Locked) (adapter.Change, error)
Pull converges both the native declaration and its local materialization.
func (Adapter) Remove ¶
func (a Adapter) Remove(ctx context.Context, root string, dep adapter.Dependency, exp adapter.Export, locked adapter.Locked) (adapter.Change, error)
Remove drops only the owned root directives. The Go module cache is shared across projects and go.sum is a checksum cache rather than a root lock, so deleting either would risk unrelated or transitively required modules.