Versions in this module Expand all Collapse all v0 v0.3.1 Nov 22, 2023 v0.3.0 Oct 26, 2023 Changes in this version + const ErrBadCalendarDuration + const ErrMixedCalendarDuration + type AggregateMethod uint8 + const AggregateAvg + const AggregateCount + const AggregateDefault + const AggregateMax + const AggregateMin + const AggregateStateHistPercent + const AggregateStateHistRate + const AggregateStateHistSeconds + const AggregateSum + func (m *AggregateMethod) UnmarshalText(data []byte) error + func (m AggregateMethod) MarshalText() ([]byte, error) + func (m AggregateMethod) String() string + type Calculation struct + Alias string + Formula string + type CalendarDuration struct + func FixedCalendarDuration(d time.Duration) CalendarDuration + func FixedCalendarDurationNullZero(d time.Duration) CalendarDuration + func MonthDuration(m int) CalendarDuration + func ParseCalendarDuration(s string) (CalendarDuration, error) + func (cd *CalendarDuration) UnmarshalText(b []byte) error + func (cd CalendarDuration) AddToTime(t time.Time) time.Time + func (cd CalendarDuration) AddToTimestamp(t Timestamp, loc *time.Location) Timestamp + func (cd CalendarDuration) Duration() time.Duration + func (cd CalendarDuration) IsZero() bool + func (cd CalendarDuration) Months() int + func (cd CalendarDuration) String() string + func (dd CalendarDuration) MarshalText() ([]byte, error) + type CalendarDurationNullZero CalendarDuration + func MonthDurationNullZero(m int) CalendarDurationNullZero + func (cd *CalendarDurationNullZero) UnmarshalJSON(data []byte) error + func (cd CalendarDurationNullZero) AddToTime(t time.Time) time.Time + func (cd CalendarDurationNullZero) AddToTimestamp(t Timestamp, loc *time.Location) Timestamp + func (cd CalendarDurationNullZero) IsZero() bool + func (cd CalendarDurationNullZero) MarshalJSON() ([]byte, error) + func (cd CalendarDurationNullZero) String() string + type Comparison struct + func Equal(v any) Comparison + func Greater(gt any) Comparison + func GreaterOrEqual(gte any) Comparison + func In(elements ...E) Comparison + func Less(lt any) Comparison + func LessOrEqual(lte any) Comparison + func MergeOperators(cmps ...Comparison) Comparison + func NotEqual(v any) Comparison + func NotIn(elements ...E) Comparison + func Range(gte, lt any) Comparison + func Regex(pattern string) Comparison + func (c *Comparison) UnmarshalJSON(data []byte) error + func (c Comparison) MarshalJSON() ([]byte, error) + func (cmp Comparison) String() string + type Comparisons map[string]Comparison + func CompareField(path string, cmp Comparison) Comparisons + type DataFilter struct + func DataAnd(filters ...DataFilter) DataFilter + func SeriesIn(keys ...string) DataFilter + func TimeRange(gte, lt time.Time) DataFilter + func (q *DataFilter) UnmarshalJSON(data []byte) error + func (q DataFilter) MarshalJSON() ([]byte, error) + type DataQuery struct + func Data() DataQuery + func (dq DataQuery) Last(n int) DataQuery + func (dq DataQuery) Origin(o time.Time) DataQuery + func (dq DataQuery) RollupDuration(d time.Duration, firstDayOfWeek time.Weekday) DataQuery + func (dq DataQuery) RollupMonths(months int) DataQuery + func (dq DataQuery) RollupWindow() DataQuery + func (dq DataQuery) TimeZone(name string) DataQuery + func (dq DataQuery) TimeZoneLocation(loc *time.Location) DataQuery + func (dq DataQuery) Where(filter DataFilter) DataQuery + func (q *DataQuery) UnmarshalJSON(data []byte) error + func (q DataQuery) MarshalJSON() ([]byte, error) type FixedDuration + func (d *FixedDuration) UnmarshalText(b []byte) error + func (d FixedDuration) MarshalText() ([]byte, error) + type FixedDurationNullZero FixedDuration + func AsFixedDurationNullZero(d time.Duration) FixedDurationNullZero + func (d *FixedDurationNullZero) UnmarshalJSON(b []byte) error + func (d FixedDurationNullZero) MarshalJSON() ([]byte, error) + func (d FixedDurationNullZero) String() string + type ItemAggregation struct + Aggregation AggregateMethod + Alias string + ID string + Lag int + Lead int + State int + func (ia ItemAggregation) MarshalJSON() ([]byte, error) + type ResourceFilter struct + func And(filters ...ResourceFilterType) ResourceFilter + func FilterAll() ResourceFilter + func Or(filters ...ResourceFilterType) ResourceFilter + func (f *ResourceFilter) UnmarshalJSON(data []byte) error + func (f ResourceFilter) MarshalJSON() ([]byte, error) + func (f ResourceFilter) String() string + type ResourceFilterType interface + type ResourceQuery struct + func Query() ResourceQuery + func (q *ResourceQuery) UnmarshalJSON(data []byte) error + func (q ResourceQuery) GetLimit() int + func (q ResourceQuery) GetSkip() int + func (q ResourceQuery) Limit(n int) ResourceQuery + func (q ResourceQuery) MarshalJSON() ([]byte, error) + func (q ResourceQuery) NextPage() ResourceQuery + func (q ResourceQuery) Skip(n int) ResourceQuery + func (q ResourceQuery) Sort(fields ...string) ResourceQuery + func (q ResourceQuery) Total(force bool) ResourceQuery + func (q ResourceQuery) Where(filter ResourceFilterType) ResourceQuery v0.3.0-pre.2 Oct 24, 2023 v0.3.0-pre.1 Oct 24, 2023 v0.3.0-pre Oct 24, 2023 v0.2.6-pre Sep 20, 2023 v0.2.5 Sep 20, 2023 v0.2.4 Oct 21, 2022 v0.2.3 Oct 12, 2022 v0.2.2 Sep 6, 2022 v0.2.1 Aug 12, 2022 v0.2.0 Jun 24, 2022 v0.1.1 Jun 24, 2022 v0.1.0 Jun 8, 2022 Changes in this version + const ErrBadFixedDuration + type Annotations map[string]string + func (m *Annotations) Set(key, value string) + func (m Annotations) Get(key string) string + type Base64 []byte + func (b *Base64) UnmarshalText(data []byte) error + func (b Base64) MarshalText() ([]byte, error) + func (b Base64) String() string + type Base64NullZero Base64 + func (zn *Base64NullZero) UnmarshalJSON(data []byte) error + func (zn Base64NullZero) MarshalJSON() ([]byte, error) + type EnumValues map[int]string + func (e EnumValues) Clone() EnumValues + func (e EnumValues) MarshalJSON() ([]byte, error) + type FixedDuration struct + func AsFixedDuration(d time.Duration) FixedDuration + func ParseFixedDuration(s string) (FixedDuration, error) + func (d *FixedDuration) UnmarshalJSON(b []byte) error + func (d FixedDuration) MarshalJSON() ([]byte, error) + func (d FixedDuration) String() string + type Hexadecimal []byte + func (b *Hexadecimal) UnmarshalText(data []byte) error + func (b Hexadecimal) MarshalText() ([]byte, error) + func (b Hexadecimal) String() string + type HexadecimalNullZero Hexadecimal + func (zn *HexadecimalNullZero) UnmarshalJSON(data []byte) error + func (zn HexadecimalNullZero) MarshalJSON() ([]byte, error) + type Labels map[string][]string + func (l *Labels) Add(key string, value string) + func (l *Labels) Remove(key string, value string) + func (l *Labels) Set(key string, values []string) + func (l Labels) Clone() Labels + func (l Labels) Get(key string) []string + func (l Labels) MarshalJSON() ([]byte, error) + type Number float64 + func (f *Number) UnmarshalJSON(data []byte) error + func (f Number) Float64() float64 + func (f Number) IsNaN() bool + func (f Number) MarshalJSON() ([]byte, error) + type Timestamp int64 + const OriginTime + func AsTimestamp(t time.Time) Timestamp + func (ts *Timestamp) UnmarshalText(data []byte) error + func (ts Timestamp) Add(d time.Duration) Timestamp + func (ts Timestamp) MarshalText() ([]byte, error) + func (ts Timestamp) Sub(ts2 Timestamp) time.Duration + func (ts Timestamp) Time() time.Time + func (ts Timestamp) Truncate(d time.Duration) Timestamp