Documentation
¶
Index ¶
- func CompareFunc(o order.Which) expr.ValueCompareFn
- func Format(s Span) string
- func Overlaps(a, b Span) bool
- type Generic
- func (g *Generic) After(zv zed.Value) bool
- func (g *Generic) Before(zv zed.Value) bool
- func (g *Generic) Crop(s Span) bool
- func (g *Generic) Extend(zv zed.Value)
- func (g *Generic) First() zed.Value
- func (g *Generic) In(zv zed.Value) bool
- func (g *Generic) Last() zed.Value
- func (g *Generic) Overlaps(first, last zed.Value) bool
- func (g *Generic) String() string
- type Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareFunc ¶
func CompareFunc(o order.Which) expr.ValueCompareFn
CompareFunc returns a generic comparator suitable for use in a Range based on the order of values in the range, i.e., when order is desc then the first value is larger than the last value and Before is true for larger values while After is true for smaller values, etc.
Types ¶
type Generic ¶
type Generic struct {
// contains filtered or unexported fields
}
func NewGeneric ¶
func NewGeneric(lower, upper zed.Value, cmp expr.ValueCompareFn) *Generic
Create a new Range from generic range of zed.Values according to lower and upper. The range is not sensitive to the absolute order of lower and upper.
type Span ¶
type Span interface { First() zed.Value Last() zed.Value Before(zed.Value) bool After(zed.Value) bool In(zed.Value) bool Overlaps(zed.Value, zed.Value) bool Crop(Span) bool Extend(zed.Value) String() string }
Span represents the closed interval [first, last] where first is "less than" last with respect to the Span's order.Which.
Click to show internal directories.
Click to hide internal directories.