Documentation ¶
Overview ¶
The `query` package replaces the `filter` package and improves support for both read- and write-oriented configuration options.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Infinite = Timeframe{}
A timeframe with no bounds, representing all time
var ZeroRange = Range{}
Functions ¶
This section is empty.
Types ¶
type ReadConfig ¶
func NewReadConfig ¶
func NewReadConfig(opts []ReadOption) ReadConfig
func (ReadConfig) Param ¶
func (f ReadConfig) Param(n string) (interface{}, bool)
Param is deprecated: use `Params.Get` instead
func (ReadConfig) WithOptions ¶
func (f ReadConfig) WithOptions(opts []ReadOption) ReadConfig
type ReadOption ¶
type ReadOption func(ReadConfig) ReadConfig
func UseReadConfig ¶
func UseReadConfig(c ReadConfig) ReadOption
func WithLimit ¶
func WithLimit(r Range) ReadOption
func WithOrder ¶
func WithOrder(o Order) ReadOption
func WithReadParams ¶
func WithReadParams(p Params) ReadOption
func WithTimeframe ¶
func WithTimeframe(t Timeframe) ReadOption
type Timeframe ¶
A timeframe
func (Timeframe) CompareDuration ¶
CompareDuration compares the duration between t.Since and t.Until with the given duration
func (Timeframe) Contains ¶
Determine if the timeframe contains the specified time. Timeframes are inclusive on the lower bound and exclusive on the upper bound.
func (Timeframe) Duration ¶
What is the duration of the timeframe. If a timeframe is not bounded on both ends, the duration is infinite, which is expressed as a negative value. If Until is before Since, the value will also be negative, this is a logically invalid state that is interpreted as the timeframe being unbounded.
type WriteConfig ¶
func NewWriteConfig ¶
func NewWriteConfig(opts []WriteOption) WriteConfig
func (WriteConfig) WithOptions ¶
func (c WriteConfig) WithOptions(opts []WriteOption) WriteConfig
type WriteOption ¶
type WriteOption func(WriteConfig) WriteConfig
func UseWriteConfig ¶
func UseWriteConfig(c WriteConfig) WriteOption
func WithCascade ¶
func WithCascade() WriteOption
func WithWriteParams ¶
func WithWriteParams(p Params) WriteOption