fielddatatype

package module
v0.0.1-alpha3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateMetricDouble

type AggregateMetricDouble struct {
	Min        float64 `json:"min"`
	Max        float64 `json:"max"`
	Sum        float64 `json:"sum"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDouble represents Aggregated metric field type. Every fields were explicitly enabled in mapping.json

type AggregateMetricDoubleMax

type AggregateMetricDoubleMax struct {
	Max float64 `json:"max"`
}

AggregateMetricDoubleMax represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMaxSum

type AggregateMetricDoubleMaxSum struct {
	Max float64 `json:"max"`
	Sum float64 `json:"sum"`
}

AggregateMetricDoubleMaxSum represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMaxSumValueCount

type AggregateMetricDoubleMaxSumValueCount struct {
	Max        float64 `json:"max"`
	Sum        float64 `json:"sum"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleMaxSumValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMaxValueCount

type AggregateMetricDoubleMaxValueCount struct {
	Max        float64 `json:"max"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleMaxValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMin

type AggregateMetricDoubleMin struct {
	Min float64 `json:"min"`
}

AggregateMetricDoubleMin represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMinMax

type AggregateMetricDoubleMinMax struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
}

AggregateMetricDoubleMinMax represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMinMaxSum

type AggregateMetricDoubleMinMaxSum struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
	Sum float64 `json:"sum"`
}

AggregateMetricDoubleMinMaxSum represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMinMaxValueCount

type AggregateMetricDoubleMinMaxValueCount struct {
	Min        float64 `json:"min"`
	Max        float64 `json:"max"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleMinMaxValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMinSum

type AggregateMetricDoubleMinSum struct {
	Min float64 `json:"min"`
	Sum float64 `json:"sum"`
}

AggregateMetricDoubleMinSum represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMinSumValueCount

type AggregateMetricDoubleMinSumValueCount struct {
	Min        float64 `json:"min"`
	Sum        float64 `json:"sum"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleMinSumValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleMinValueCount

type AggregateMetricDoubleMinValueCount struct {
	Min        float64 `json:"min"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleMinValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleSum

type AggregateMetricDoubleSum struct {
	Sum float64 `json:"sum"`
}

AggregateMetricDoubleSum represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleSumValueCount

type AggregateMetricDoubleSumValueCount struct {
	Sum        float64 `json:"sum"`
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleSumValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type AggregateMetricDoubleValueCount

type AggregateMetricDoubleValueCount struct {
	ValueCount float64 `json:"value_count"`
}

AggregateMetricDoubleValueCount represents Aggregate metric field type. As suffix suggests it is a partial object whose fields are explicitly enabled in mapping.json.

type Boolean

type Boolean bool

Boolean is an elastic boolean type. It can be unmarshalled from boolean literal, string literal of "true" / "false" or "" (empty string). see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/boolean.html

It marshals into boolean literal.

func (Boolean) MarshalJSON

func (b Boolean) MarshalJSON() ([]byte, error)

MarshalJSON marshals this type into byte slice representing JSON boolean literal, true or false.

func (Boolean) String

func (b Boolean) String() string

func (*Boolean) UnmarshalJSON

func (b *Boolean) UnmarshalJSON(data []byte) error

type BooleanStr

type BooleanStr bool

BooleanStr is an elastic boolean type. It can be unmarshaled from boolean literal, string literal of "true" / "false" or "" (empty string). see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/boolean.html

It marshals into string literal, "true" or "false".

func (BooleanStr) MarshalJSON

func (b BooleanStr) MarshalJSON() ([]byte, error)

MarshalJSON marshals this type into byte slice representing JSON string literal, "true" or "false". This never converts to an empty string.

func (BooleanStr) String

func (b BooleanStr) String() string

func (*BooleanStr) UnmarshalJSON

func (b *BooleanStr) UnmarshalJSON(data []byte) error

type GeoPoint

type GeoPoint struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
}

Elasticsearch geo point type.

For historical reason, it has 6 formats to represent same data type. This type marshal into only one format, simple json consists of lat and lon keys populated with Number, namely, `{"lat":123, "lon":456}`.

see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/geo-point.html

func UnmarshalEsGeoPointJSON

func UnmarshalEsGeoPointJSON(data []byte) (GeoPoint, error)

func UnmarshalEsGeoPointText

func UnmarshalEsGeoPointText(text []byte) (GeoPoint, error)

func (*GeoPoint) UnmarshalJSON

func (g *GeoPoint) UnmarshalJSON(data []byte) error

func (*GeoPoint) UnmarshalText

func (g *GeoPoint) UnmarshalText(text []byte) error

type GeoShape

type GeoShape struct {
	// avoid embedding this because it could confuse user when re-defined type is made in user code.
	Geometry geom.Geometry
}

TODO: test against elasticsearch 8.4

func (GeoShape) MarshalJSON

func (g GeoShape) MarshalJSON() ([]byte, error)

func (*GeoShape) UnmarshalJSON

func (g *GeoShape) UnmarshalJSON(data []byte) error

type Histogram

type Histogram struct {
	Values []float64 `json:"values"`
	Counts []int32   `json:"counts"`
}

type InvalidTypeError

type InvalidTypeError struct {
	// name of Go type
	Type         string
	SupposedToBe []any
	InputValue   []byte
}

func (*InvalidTypeError) Error

func (e *InvalidTypeError) Error() string

type Range

type Range[T comparable] struct {
	Gt  *T `json:"gt,omitempty"`
	Gte *T `json:"gte,omitempty"`
	Lt  *T `json:"lt,omitempty"`
	Lte *T `json:"lte,omitempty"`
}

https://www.elastic.co/guide/en/elasticsearch/reference/8.4/range.html

Directories

Path Synopsis
builtin_layouts
builtinlayouts is collection of date formats built in Elasticsearch
builtinlayouts is collection of date formats built in Elasticsearch

Jump to

Keyboard shortcuts

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