example

package
v0.0.0-...-879d843 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type All

type All struct {
	Agg             *estype.AggregateMetricDouble `json:"agg"`
	Alias           *any                          `json:"alias"`
	Blob            *[]byte                       `json:"blob"`
	Bool            *estype.Boolean               `json:"bool"`
	Byte            *int8                         `json:"byte"`
	Comp            *string                       `json:"comp"`
	ConstantKwd     *string                       `json:"constant_kwd"`
	Date            *AllDate                      `json:"date"`
	DateNano        *AllDateNano                  `json:"dateNano"`
	DateRange       *map[string]interface{}       `json:"date_range"`
	DenseVector     *[]float64                    `json:"dense_vector"`
	Double          *float64                      `json:"double"`
	DoubleRange     *map[string]interface{}       `json:"double_range"`
	Flattened       *map[string]interface{}       `json:"flattened"`
	Float           *float32                      `json:"float"`
	FloatRange      *map[string]interface{}       `json:"float_range"`
	Geopoint        *estype.Geopoint              `json:"geopoint"`
	Geoshape        *estype.Geoshape              `json:"geoshape"`
	HalfFloat       *float32                      `json:"half_float"`
	Histogram       *map[string]interface{}       `json:"histogram"`
	Integer         *int32                        `json:"integer"`
	IntegerRange    *map[string]interface{}       `json:"integer_range"`
	IpAddr          *netip.Addr                   `json:"ip_addr"`
	IpRange         *map[string]interface{}       `json:"ip_range"`
	Join            *map[string]interface{}       `json:"join"`
	Kwd             *string                       `json:"kwd"`
	Long            *int64                        `json:"long"`
	LongRange       *map[string]interface{}       `json:"long_range"`
	Nested          *AllNested                    `json:"nested"`
	Object          *AllObject                    `json:"object"`
	Point           *map[string]interface{}       `json:"point"`
	Query           *map[string]interface{}       `json:"query"`
	RankFeature     *float64                      `json:"rank_feature"`
	RankFeatures    *map[string]float64           `json:"rank_features"`
	ScaledFloat     *float64                      `json:"scaled_float"`
	SearchAsYouType *string                       `json:"search_as_you_type"`
	Shape           *estype.Geoshape              `json:"shape"`
	Short           *int16                        `json:"short"`
	Text            *string                       `json:"text"`
	TextWTokenCount *string                       `json:"text_w_token_count"`
	UnsignedLong    *uint64                       `json:"unsigned_long"`
	Version         *string                       `json:"version"`
	Wildcard        *string                       `json:"wildcard"`
}

func (All) ToRaw

func (t All) ToRaw() AllRaw

type AllDate

type AllDate time.Time

AllDate represents elasticsearch date.

func (AllDate) MarshalJSON

func (t AllDate) MarshalJSON() ([]byte, error)

func (AllDate) String

func (t AllDate) String() string

func (*AllDate) UnmarshalJSON

func (t *AllDate) UnmarshalJSON(data []byte) error

type AllDateNano

type AllDateNano time.Time

AllDateNano represents elasticsearch date.

func (AllDateNano) MarshalJSON

func (t AllDateNano) MarshalJSON() ([]byte, error)

func (AllDateNano) String

func (t AllDateNano) String() string

func (*AllDateNano) UnmarshalJSON

func (t *AllDateNano) UnmarshalJSON(data []byte) error

type AllName

type AllName struct {
	First *string `json:"first"`
	Last  *string `json:"last"`
}

func (AllName) ToRaw

func (t AllName) ToRaw() AllNameRaw

type AllNameRaw

type AllNameRaw struct {
	First estype.Field[string] `json:"first" esjson:"single"`
	Last  estype.Field[string] `json:"last" esjson:"single"`
}

func (AllNameRaw) MarshalJSON

func (r AllNameRaw) MarshalJSON() ([]byte, error)

func (AllNameRaw) ToPlain

func (t AllNameRaw) ToPlain() AllName

type AllNested

type AllNested struct {
	Age  *int32   `json:"age"`
	Name *AllName `json:"name"`
}

func (AllNested) ToRaw

func (t AllNested) ToRaw() AllNestedRaw

type AllNestedRaw

type AllNestedRaw struct {
	Age  estype.Field[int32]      `json:"age" esjson:"single"`
	Name estype.Field[AllNameRaw] `json:"name" esjson:"single"`
}

func (AllNestedRaw) MarshalJSON

func (r AllNestedRaw) MarshalJSON() ([]byte, error)

func (AllNestedRaw) ToPlain

func (t AllNestedRaw) ToPlain() AllNested

type AllObject

type AllObject struct {
	Age  *int32         `json:"age"`
	Name *AllObjectName `json:"name"`
}

func (AllObject) ToRaw

func (t AllObject) ToRaw() AllObjectRaw

type AllObjectName

type AllObjectName struct {
	First *string `json:"first"`
	Last  *string `json:"last"`
}

func (AllObjectName) ToRaw

func (t AllObjectName) ToRaw() AllObjectNameRaw

type AllObjectNameRaw

type AllObjectNameRaw struct {
	First estype.Field[string] `json:"first" esjson:"single"`
	Last  estype.Field[string] `json:"last" esjson:"single"`
}

func (AllObjectNameRaw) MarshalJSON

func (r AllObjectNameRaw) MarshalJSON() ([]byte, error)

func (AllObjectNameRaw) ToPlain

func (t AllObjectNameRaw) ToPlain() AllObjectName

type AllObjectRaw

type AllObjectRaw struct {
	Age  estype.Field[int32]            `json:"age" esjson:"single"`
	Name estype.Field[AllObjectNameRaw] `json:"name" esjson:"single"`
}

func (AllObjectRaw) MarshalJSON

func (r AllObjectRaw) MarshalJSON() ([]byte, error)

func (AllObjectRaw) ToPlain

func (t AllObjectRaw) ToPlain() AllObject

type AllRaw

type AllRaw struct {
	Agg             estype.Field[estype.AggregateMetricDouble] `json:"agg" esjson:"single"`
	Alias           estype.Field[any]                          `json:"alias" esjson:"single"`
	Blob            estype.Field[[]byte]                       `json:"blob" esjson:"single"`
	Bool            estype.Field[estype.Boolean]               `json:"bool" esjson:"single"`
	Byte            estype.Field[int8]                         `json:"byte" esjson:"single"`
	Comp            estype.Field[string]                       `json:"comp" esjson:"single"`
	ConstantKwd     estype.Field[string]                       `json:"constant_kwd" esjson:"single"`
	Date            estype.Field[AllDate]                      `json:"date" esjson:"single"`
	DateNano        estype.Field[AllDateNano]                  `json:"dateNano" esjson:"single"`
	DateRange       estype.Field[map[string]interface{}]       `json:"date_range" esjson:"single"`
	DenseVector     estype.Field[[]float64]                    `json:"dense_vector" esjson:"single"`
	Double          estype.Field[float64]                      `json:"double" esjson:"single"`
	DoubleRange     estype.Field[map[string]interface{}]       `json:"double_range" esjson:"single"`
	Flattened       estype.Field[map[string]interface{}]       `json:"flattened" esjson:"single"`
	Float           estype.Field[float32]                      `json:"float" esjson:"single"`
	FloatRange      estype.Field[map[string]interface{}]       `json:"float_range" esjson:"single"`
	Geopoint        estype.Field[estype.Geopoint]              `json:"geopoint" esjson:"single"`
	Geoshape        estype.Field[estype.Geoshape]              `json:"geoshape" esjson:"single"`
	HalfFloat       estype.Field[float32]                      `json:"half_float" esjson:"single"`
	Histogram       estype.Field[map[string]interface{}]       `json:"histogram" esjson:"single"`
	Integer         estype.Field[int32]                        `json:"integer" esjson:"single"`
	IntegerRange    estype.Field[map[string]interface{}]       `json:"integer_range" esjson:"single"`
	IpAddr          estype.Field[netip.Addr]                   `json:"ip_addr" esjson:"single"`
	IpRange         estype.Field[map[string]interface{}]       `json:"ip_range" esjson:"single"`
	Join            estype.Field[map[string]interface{}]       `json:"join" esjson:"single"`
	Kwd             estype.Field[string]                       `json:"kwd" esjson:"single"`
	Long            estype.Field[int64]                        `json:"long" esjson:"single"`
	LongRange       estype.Field[map[string]interface{}]       `json:"long_range" esjson:"single"`
	Nested          estype.Field[AllNestedRaw]                 `json:"nested" esjson:"single"`
	Object          estype.Field[AllObjectRaw]                 `json:"object" esjson:"single"`
	Point           estype.Field[map[string]interface{}]       `json:"point" esjson:"single"`
	Query           estype.Field[map[string]interface{}]       `json:"query" esjson:"single"`
	RankFeature     estype.Field[float64]                      `json:"rank_feature" esjson:"single"`
	RankFeatures    estype.Field[map[string]float64]           `json:"rank_features" esjson:"single"`
	ScaledFloat     estype.Field[float64]                      `json:"scaled_float" esjson:"single"`
	SearchAsYouType estype.Field[string]                       `json:"search_as_you_type" esjson:"single"`
	Shape           estype.Field[estype.Geoshape]              `json:"shape" esjson:"single"`
	Short           estype.Field[int16]                        `json:"short" esjson:"single"`
	Text            estype.Field[string]                       `json:"text" esjson:"single"`
	TextWTokenCount estype.Field[string]                       `json:"text_w_token_count" esjson:"single"`
	UnsignedLong    estype.Field[uint64]                       `json:"unsigned_long" esjson:"single"`
	Version         estype.Field[string]                       `json:"version" esjson:"single"`
	Wildcard        estype.Field[string]                       `json:"wildcard" esjson:"single"`
}

func (AllRaw) MarshalJSON

func (r AllRaw) MarshalJSON() ([]byte, error)

func (AllRaw) ToPlain

func (t AllRaw) ToPlain() All

type Example

type Example struct {
	Blob [][]byte        `json:"blob"`
	Bool *estype.Boolean `json:"bool"`
	Date ExampleDate     `json:"date"`
}

func (Example) ToRaw

func (t Example) ToRaw() ExampleRaw

type ExampleDate

type ExampleDate time.Time

ExampleDate represents elasticsearch date.

func (ExampleDate) MarshalJSON

func (t ExampleDate) MarshalJSON() ([]byte, error)

func (ExampleDate) String

func (t ExampleDate) String() string

func (*ExampleDate) UnmarshalJSON

func (t *ExampleDate) UnmarshalJSON(data []byte) error

type ExampleRaw

type ExampleRaw struct {
	Blob estype.Field[[]byte]         `json:"blob"`
	Bool estype.Field[estype.Boolean] `json:"bool" esjson:"single"`
	Date estype.Field[ExampleDate]    `json:"date" esjson:"single"`
}

func (ExampleRaw) MarshalJSON

func (r ExampleRaw) MarshalJSON() ([]byte, error)

func (ExampleRaw) ToPlain

func (t ExampleRaw) ToPlain() Example

type ObjectDynamicInheritance

type ObjectDynamicInheritance struct {
	Manager *[]ObjectDynamicInheritanceManager `json:"manager"`
	Player  *[]ObjectDynamicInheritancePlayer  `json:"player"`
}

func (ObjectDynamicInheritance) ToRaw

type ObjectDynamicInheritanceManager

type ObjectDynamicInheritanceManager struct {
	Age  *[]int32                        `json:"age"`
	Name *[]ObjectDynamicInheritanceName `json:"name"`
}

func (ObjectDynamicInheritanceManager) ToRaw

type ObjectDynamicInheritanceManagerRaw

type ObjectDynamicInheritanceManagerRaw struct {
	Age  estype.Field[int32]                           `json:"age"`
	Name estype.Field[ObjectDynamicInheritanceNameRaw] `json:"name"`
}

func (ObjectDynamicInheritanceManagerRaw) MarshalJSON

func (r ObjectDynamicInheritanceManagerRaw) MarshalJSON() ([]byte, error)

func (ObjectDynamicInheritanceManagerRaw) ToPlain

type ObjectDynamicInheritanceName

type ObjectDynamicInheritanceName struct {
	First *[]string `json:"first"`
	Last  *[]string `json:"last"`
}

func (ObjectDynamicInheritanceName) ToRaw

type ObjectDynamicInheritanceNameRaw

type ObjectDynamicInheritanceNameRaw struct {
	First estype.Field[string] `json:"first"`
	Last  estype.Field[string] `json:"last"`
}

func (ObjectDynamicInheritanceNameRaw) MarshalJSON

func (r ObjectDynamicInheritanceNameRaw) MarshalJSON() ([]byte, error)

func (ObjectDynamicInheritanceNameRaw) ToPlain

type ObjectDynamicInheritancePlayer

type ObjectDynamicInheritancePlayer map[string][]any

func (ObjectDynamicInheritancePlayer) ToRaw

type ObjectDynamicInheritancePlayerRaw

type ObjectDynamicInheritancePlayerRaw map[string]estype.Field[any]

func (ObjectDynamicInheritancePlayerRaw) ToPlain

type ObjectDynamicInheritanceRaw

type ObjectDynamicInheritanceRaw struct {
	Manager estype.Field[ObjectDynamicInheritanceManagerRaw] `json:"manager"`
	Player  estype.Field[ObjectDynamicInheritancePlayerRaw]  `json:"player"`
}

func (ObjectDynamicInheritanceRaw) MarshalJSON

func (r ObjectDynamicInheritanceRaw) MarshalJSON() ([]byte, error)

func (ObjectDynamicInheritanceRaw) ToPlain

type ObjectExample

type ObjectExample struct {
	Manager *[]ObjectExampleManager `json:"manager"`
}

func (ObjectExample) ToRaw

func (t ObjectExample) ToRaw() ObjectExampleRaw

type ObjectExampleManager

type ObjectExampleManager struct {
	Age  int32             `json:"age"`
	Name ObjectExampleName `json:"name"`
}

func (ObjectExampleManager) ToRaw

type ObjectExampleManagerRaw

type ObjectExampleManagerRaw struct {
	Age  estype.Field[int32]                `json:"age" esjson:"single"`
	Name estype.Field[ObjectExampleNameRaw] `json:"name" esjson:"single"`
}

func (ObjectExampleManagerRaw) MarshalJSON

func (r ObjectExampleManagerRaw) MarshalJSON() ([]byte, error)

func (ObjectExampleManagerRaw) ToPlain

type ObjectExampleName

type ObjectExampleName struct {
	First string   `json:"first"`
	Last  []string `json:"last"`
}

func (ObjectExampleName) ToRaw

type ObjectExampleNameRaw

type ObjectExampleNameRaw struct {
	First estype.Field[string] `json:"first" esjson:"single"`
	Last  estype.Field[string] `json:"last"`
}

func (ObjectExampleNameRaw) MarshalJSON

func (r ObjectExampleNameRaw) MarshalJSON() ([]byte, error)

func (ObjectExampleNameRaw) ToPlain

type ObjectExampleRaw

type ObjectExampleRaw struct {
	Manager estype.Field[ObjectExampleManagerRaw] `json:"manager"`
}

func (ObjectExampleRaw) MarshalJSON

func (r ObjectExampleRaw) MarshalJSON() ([]byte, error)

func (ObjectExampleRaw) ToPlain

func (t ObjectExampleRaw) ToPlain() ObjectExample

type ObjectWOverlap

type ObjectWOverlap struct {
	Manager     *[]ObjectWOverlapManager     `json:"manager"`
	Subordinate *[]ObjectWOverlapSubordinate `json:"subordinate"`
}

func (ObjectWOverlap) ToRaw

type ObjectWOverlapManager

type ObjectWOverlapManager struct {
	Age  *[]int32              `json:"age"`
	Name *[]ObjectWOverlapName `json:"name"`
}

func (ObjectWOverlapManager) ToRaw

type ObjectWOverlapManagerRaw

type ObjectWOverlapManagerRaw struct {
	Age  estype.Field[int32]                 `json:"age"`
	Name estype.Field[ObjectWOverlapNameRaw] `json:"name"`
}

func (ObjectWOverlapManagerRaw) MarshalJSON

func (r ObjectWOverlapManagerRaw) MarshalJSON() ([]byte, error)

func (ObjectWOverlapManagerRaw) ToPlain

type ObjectWOverlapName

type ObjectWOverlapName struct {
	First *[]string `json:"first"`
	Last  *[]string `json:"last"`
}

func (ObjectWOverlapName) ToRaw

type ObjectWOverlapNameRaw

type ObjectWOverlapNameRaw struct {
	First estype.Field[string] `json:"first"`
	Last  estype.Field[string] `json:"last"`
}

func (ObjectWOverlapNameRaw) MarshalJSON

func (r ObjectWOverlapNameRaw) MarshalJSON() ([]byte, error)

func (ObjectWOverlapNameRaw) ToPlain

type ObjectWOverlapRaw

type ObjectWOverlapRaw struct {
	Manager     estype.Field[ObjectWOverlapManagerRaw]     `json:"manager"`
	Subordinate estype.Field[ObjectWOverlapSubordinateRaw] `json:"subordinate"`
}

func (ObjectWOverlapRaw) MarshalJSON

func (r ObjectWOverlapRaw) MarshalJSON() ([]byte, error)

func (ObjectWOverlapRaw) ToPlain

func (t ObjectWOverlapRaw) ToPlain() ObjectWOverlap

type ObjectWOverlapSubordinate

type ObjectWOverlapSubordinate struct {
	Age  *[]int32                         `json:"age"`
	Name *[]ObjectWOverlapSubordinateName `json:"name"`
}

func (ObjectWOverlapSubordinate) ToRaw

type ObjectWOverlapSubordinateName

type ObjectWOverlapSubordinateName struct {
	First *[]string `json:"first"`
	Last  *[]string `json:"last"`
}

func (ObjectWOverlapSubordinateName) ToRaw

type ObjectWOverlapSubordinateNameRaw

type ObjectWOverlapSubordinateNameRaw struct {
	First estype.Field[string] `json:"first"`
	Last  estype.Field[string] `json:"last"`
}

func (ObjectWOverlapSubordinateNameRaw) MarshalJSON

func (r ObjectWOverlapSubordinateNameRaw) MarshalJSON() ([]byte, error)

func (ObjectWOverlapSubordinateNameRaw) ToPlain

type ObjectWOverlapSubordinateRaw

type ObjectWOverlapSubordinateRaw struct {
	Age  estype.Field[int32]                            `json:"age"`
	Name estype.Field[ObjectWOverlapSubordinateNameRaw] `json:"name"`
}

func (ObjectWOverlapSubordinateRaw) MarshalJSON

func (r ObjectWOverlapSubordinateRaw) MarshalJSON() ([]byte, error)

func (ObjectWOverlapSubordinateRaw) ToPlain

Jump to

Keyboard shortcuts

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