Documentation ¶
Overview ¶
Package version provides version constraints for queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Includes ¶
func Includes(c Constraints, v ...int) bool
Includes determines if the Constraints c includes all of v.
Types ¶
type Constraints ¶
type Constraints interface { // Exact returns the exact versions to query for. Exact() []int // Ranges returns the version ranges to query for. Ranges() []Range // Min returns the minimum allowed versions to query for. Min() []int // Max returns the maximu allowed versions to query for. Max() []int }
Constraints are the version constraints for an event query. Methods of Constraints that return non-nil filters must all be fulfilled by an event to be included in the query result. If a filter allows multiple values, the event must match at least one of the values.
func Filter ¶
func Filter(opts ...Option) Constraints
Filter returns Constraints from the given Constraint opts.
func Merge ¶
func Merge(constraints ...Constraints) Constraints
Merge merges mutliple Constraints into one.
type Option ¶
type Option func(*constraints)
A Option defines a version constraint.
func DryMerge ¶
func DryMerge(constraints ...Constraints) []Option
DryMerge returns the Options to merge the provided Constraints.
Click to show internal directories.
Click to hide internal directories.