Documentation
¶
Overview ¶
Package pitotql parses the text form of Pitot's structured telemetry queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCompleteRequest ¶
func CheckCompleteRequest(req CompleteRequest) error
CheckCompleteRequest rejects a cursor outside the text and a window that is not a duration, so a client bug is a 400 rather than silent defaults.
Types ¶
type Compiled ¶
type CompleteRequest ¶
type CompleteResponse ¶
type CompleteResponse struct {
Replace query.TextSpan `json:"replace"`
Items []Item `json:"items"`
Schema SchemaStatus `json:"schema"`
}
type Completer ¶
type Completer struct {
// contains filtered or unexported fields
}
func NewCompleter ¶
func NewCompleter(source schemaSource) *Completer
func (*Completer) Complete ¶
func (c *Completer) Complete(ctx context.Context, req CompleteRequest) CompleteResponse
type Formatted ¶
type Formatted struct {
Requires []Requirement `json:"requires"`
Text string `json:"text"`
Exactness Exactness `json:"exactness"`
Editable bool `json:"editable"`
Reason string `json:"reason,omitempty"`
Notices []Notice `json:"notices"`
// Each stored filter and measure as PitotQL, in stored order, so an editor
// can label entries it cannot edit without showing their SQL.
Where []string `json:"where"`
Measures []string `json:"measures"`
}
type Options ¶
type Options struct {
Panel *query.Panel `json:"panel,omitempty"`
Source string `json:"source,omitempty"`
Viz string `json:"viz,omitempty"`
Variables []query.Variable `json:"variables,omitempty"`
Schema *query.Schema `json:"-"`
// SchemaPartial says Schema may not cover the query's window or
// namespace: notices may name a seen key but offer no fix.
SchemaPartial bool `json:"-"`
}
type Requirement ¶
type Requirement struct {
Name query.VizRequirement `json:"name"`
Satisfied bool `json:"satisfied"`
}