dsl

package
v4.6.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregation

type Aggregation struct {
	AggType int      `json:"type"`
	Sort    []Sort   `json:"sort"`
	Limit   int      `json:"limit"`
	Offset  int      `json:"offset"`
	Fields  []string `json:"fields"`
}

type DSL

type DSL struct {
	Namespace    string        `json:"namespace"`
	Offset       int           `json:"offset"`
	Limit        int           `json:"limit"`
	Distinct     string        `json:"distinct"` // deprecated, use aggregation with type AggDistinct instead
	Sort         Sort          `json:"sort"`
	Filters      []Filter      `json:"filters"`
	Explain      bool          `json:"explain,omitempty"`
	Aggregations []Aggregation `json:"aggregations"`
}

type Filter

type Filter struct {
	Op    string
	Field string
	Cond  string
	Value interface{}
}

func (*Filter) ParseValue

func (f *Filter) ParseValue(data string) error

func (*Filter) UnmarshalJSON

func (f *Filter) UnmarshalJSON(data []byte) error

type Sort

type Sort struct {
	Field  string        `json:"field"`
	Desc   bool          `json:"desc"`
	Values []interface{} `json:"values,omitempty"`
}

func (*Sort) CheckValuesType

func (s *Sort) CheckValuesType() error

func (*Sort) UnmarshalJSON

func (s *Sort) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL