Documentation ¶
Index ¶
- Variables
- func IsIdent(s string) bool
- func Parse(s string) (any, error)
- func SplitAliasName(s string) (string, string)
- func String(expr Expr) string
- type BinaryExpr
- type BinaryOp
- type BoolOp
- type Expr
- type Filter
- type FilterOp
- type Filters
- type Func
- type FuncCall
- type Grouping
- type GroupingElem
- type GroupingElems
- type MetricExpr
- type NamedExpr
- type Number
- type NumberKind
- type ParenExpr
- type QueryPart
- type Selector
- type StringValue
- type StringValues
- type Token
- type TokenID
- type UniqExpr
- type Value
- type Where
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FuncLower = NewGroupingFunc("lower", "lowerUTF8(?)") FuncUpper = NewGroupingFunc("upper", "upperUTF8(?)") )
Functions ¶
func SplitAliasName ¶
Types ¶
type BinaryExpr ¶
func (*BinaryExpr) AppendString ¶
func (e *BinaryExpr) AppendString(b []byte) []byte
func (*BinaryExpr) AppendTemplate ¶
func (e *BinaryExpr) AppendTemplate(b []byte) []byte
type FilterOp ¶
type FilterOp string
const ( FilterEqual FilterOp = "=" FilterNotEqual FilterOp = "!=" FilterLT FilterOp = "<" FilterLTE FilterOp = "<=" FilterGT FilterOp = ">" FilterGTE FilterOp = ">=" FilterIn FilterOp = "in" FilterNotIn FilterOp = "not in" FilterRegexp FilterOp = "~" FilterNotRegexp FilterOp = "!~" FilterLike FilterOp = "like" FilterNotLike FilterOp = "not like" FilterExists FilterOp = "exists" FilterNotExists FilterOp = "not exists" )
type Func ¶
func NewGroupingFunc ¶
type FuncCall ¶
type FuncCall struct { Func string Arg Expr Grouping GroupingElems }
func (*FuncCall) AppendString ¶
func (*FuncCall) AppendTemplate ¶
type Grouping ¶
type Grouping struct {
Elems GroupingElems
}
type GroupingElem ¶
func (GroupingElem) AppendString ¶
func (g GroupingElem) AppendString(b []byte) []byte
type GroupingElems ¶
type GroupingElems []GroupingElem
func (GroupingElems) AppendString ¶
func (els GroupingElems) AppendString(b []byte) []byte
func (GroupingElems) Attrs ¶
func (els GroupingElems) Attrs() []string
type MetricExpr ¶
type MetricExpr struct { Name string Filters []Filter RollupWindow time.Duration Offset time.Duration Grouping GroupingElems }
func (*MetricExpr) AppendString ¶
func (me *MetricExpr) AppendString(b []byte) []byte
func (*MetricExpr) AppendTemplate ¶
func (me *MetricExpr) AppendTemplate(b []byte) []byte
type NamedExpr ¶
func (*NamedExpr) AppendString ¶
type Number ¶
type Number struct { Text string Kind NumberKind }
func (Number) AppendString ¶
func (Number) AppendTemplate ¶
type NumberKind ¶
type NumberKind int
const ( NumberUnitless NumberKind = iota NumberDuration NumberBytes )
type ParenExpr ¶
type ParenExpr struct {
Expr
}
func (ParenExpr) AppendString ¶
func (ParenExpr) AppendTemplate ¶
type StringValue ¶
type StringValue struct {
Text string
}
func (StringValue) AppendString ¶
func (v StringValue) AppendString(b []byte) []byte
type StringValues ¶
type StringValues struct {
Values []string
}
func (StringValues) AppendString ¶
func (v StringValues) AppendString(b []byte) []byte
type UniqExpr ¶
type UniqExpr struct { Name *MetricExpr Attrs []string }
func (*UniqExpr) AppendString ¶
func (*UniqExpr) AppendTemplate ¶
Click to show internal directories.
Click to hide internal directories.