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 provides the different constraints for querying events. An event.Store that uses Constraints should combine the different types of constraints with a logical "AND" and the different values for a constraint with a logical "OR".
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 is an option for constraints.
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.