Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyOfGroup ¶
type AnyOfGroup struct {
Name string
Members map[string]*semver.Constraints
}
AnyOfGroup is an alternative-dependency group: at least one member must be installed and satisfy its constraint for the group to pass. A nil constraint on a member means "any installed version of this alternative is acceptable".
type AnyOfRule ¶
type AnyOfRule struct {
// contains filtered or unexported fields
}
AnyOfRule evaluates one or more AnyOf groups against the current dependency graph. Each group is satisfied independently — for the package to pass, every group must have ≥1 installed member that meets its constraint. It is a gate: it returns Undefined or Forbid only.
AnyOf groups add no edges to the topological graph, so fallback chains across packages (A any-of {B, C}; B any-of {A, D}) do not produce cycles.
func NewAnyOfRule ¶
func NewAnyOfRule(getter Getter, groups []AnyOfGroup) *AnyOfRule
NewAnyOfRule constructs an AnyOfRule that resolves member versions through the given Getter (shared with the regular dependency.Rule).
func (*AnyOfRule) Decide ¶
Decide returns Undefined when every group has ≥1 installed member that satisfies its constraint. The first failing group short-circuits to Forbid; the Reason is AnyOfDependenciesUnmet and the Message names the group plus its members in sorted order so identical inputs produce identical messages across reconciles.
type Dependency ¶
type Dependency struct {
Constraint *semver.Constraints
// if node not present, just skip check
Optional bool
}
Dependency describes a requirement on another module's installed version.
type NoneOfGroup ¶
type NoneOfGroup struct {
Name string
Members map[string]*semver.Constraints
}
NoneOfGroup is a group of forbidden dependencies: no member may be installed in a way that matches its constraint. A nil constraint on a member forbids the module at any installed version; a non-nil constraint narrows the forbidden range, so versions outside the constraint remain acceptable.
type NoneOfRule ¶
type NoneOfRule struct {
// contains filtered or unexported fields
}
NoneOfRule evaluates one or more NoneOf groups against the current dependency graph. Each group is violated independently — for the package to pass, every group must have zero installed members that match their constraints. It is a gate: it returns Undefined or Forbid only. NoneOf groups add no edges to the topological graph; "must not be installed" expresses an admission predicate, not an ordering relation.
func NewNoneOfRule ¶
func NewNoneOfRule(getter Getter, groups []NoneOfGroup) *NoneOfRule
NewNoneOfRule constructs a NoneOfRule that resolves member versions through the given Getter (shared with the regular dependency.Rule and the AnyOfRule).
func (*NoneOfRule) Decide ¶
func (r *NoneOfRule) Decide() rule.Decision
Decide returns Undefined when every group has zero violators. The first violated group short-circuits to Forbid; the Reason is NoneOfDependenciesViolated and the Message names the group plus its actual offending members in sorted order so identical inputs produce identical messages across reconciles.
type Rule ¶
type Rule struct {
// contains filtered or unexported fields
}
Rule is a gate that vetoes a package whose declared dependencies are absent or installed at an incompatible version. It only ever returns Undefined or Forbid — it never turns a package on.