extractionfn

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(data []byte) (builder.ExtractionFn, error)

Types

type Base

type Base struct {
	Typ builder.ComponentType `json:"type,omitempty"`
}

func (*Base) SetType

func (b *Base) SetType(typ builder.ComponentType) *Base

func (*Base) Type

func (b *Base) Type() builder.ComponentType

type Bucket

type Bucket struct {
	Base
	Size   *float64 `json:"size,omitempty"`
	Offset *float64 `json:"offset,omitempty"`
}

func NewBucket

func NewBucket() *Bucket

func (*Bucket) SetOffset

func (b *Bucket) SetOffset(offset float64) *Bucket

func (*Bucket) SetSize

func (b *Bucket) SetSize(size float64) *Bucket

type Cascade

type Cascade struct {
	Base
	ExtractionFns []builder.ExtractionFn `json:"extractionFns,omitempty"`
}

func NewCascade

func NewCascade() *Cascade

func (*Cascade) SetExtractionFns

func (c *Cascade) SetExtractionFns(extractionFns []builder.ExtractionFn) *Cascade

func (*Cascade) UnmarshalJSON

func (c *Cascade) UnmarshalJSON(data []byte) error

type Identity

type Identity struct {
	Base
}

func NewIdentity

func NewIdentity() *Identity

type Javascript

type Javascript struct {
	Base
	Function  string `json:"function,omitempty"`
	Injective *bool  `json:"injective,omitempty"`
}

func NewJavascript

func NewJavascript() *Javascript

func (*Javascript) SetFunction

func (j *Javascript) SetFunction(function string) *Javascript

func (*Javascript) SetInjective

func (j *Javascript) SetInjective(injective bool) *Javascript

type Lookup

type Lookup struct {
	Base
	Lookup                  builder.LookupExtractor `json:"lookup,omitempty"`
	RetainMissingValue      *bool                   `json:"retainMissingValue,omitempty"`
	ReplaceMissingValueWith string                  `json:"replaceMissingValueWith,omitempty"`
	Injective               *bool                   `json:"injective,omitempty"`
	Optimize                *bool                   `json:"optimize,omitempty"`
}

func NewLookup

func NewLookup() *Lookup

func (*Lookup) SetInjective

func (l *Lookup) SetInjective(injective bool) *Lookup

func (*Lookup) SetLookup

func (l *Lookup) SetLookup(lookup builder.LookupExtractor) *Lookup

func (*Lookup) SetOptimize

func (l *Lookup) SetOptimize(optimize bool) *Lookup

func (*Lookup) SetReplaceMissingValueWith

func (l *Lookup) SetReplaceMissingValueWith(replaceMissingValueWith string) *Lookup

func (*Lookup) SetRetainMissingValue

func (l *Lookup) SetRetainMissingValue(retainMissingValue bool) *Lookup

func (*Lookup) UnmarshalJSON

func (l *Lookup) UnmarshalJSON(data []byte) error

type Lower

type Lower struct {
	Base
	Locale string `json:"locale,omitempty"`
}

func NewLower

func NewLower() *Lower

func (*Lower) SetLocale

func (l *Lower) SetLocale(locale string) *Lower

type Partial

type Partial struct {
	Base
	Expr string `json:"expr,omitempty"`
}

func NewPartial

func NewPartial() *Partial

func (*Partial) SetExpr

func (p *Partial) SetExpr(expr string) *Partial

type Regex

type Regex struct {
	Base
	Expr                    string `json:"expr,omitempty"`
	Index                   int64  `json:"index,omitempty"`
	ReplaceMissingValue     *bool  `json:"replaceMissingValue,omitempty"`
	ReplaceMissingValueWith string `json:"replaceMissingValueWith,omitempty"`
}

func NewRegex

func NewRegex() *Regex

func (*Regex) SetExpr

func (r *Regex) SetExpr(expr string) *Regex

func (*Regex) SetIndex

func (r *Regex) SetIndex(index int64) *Regex

func (*Regex) SetReplaceMissingValue

func (r *Regex) SetReplaceMissingValue(replaceMissingValue bool) *Regex

func (*Regex) SetReplaceMissingValueWith

func (r *Regex) SetReplaceMissingValueWith(replaceMissingValueWith string) *Regex

type RegisteredLookup

type RegisteredLookup struct {
	Base
	Lookup                  string `json:"lookup,omitempty"`
	RetainMissingValue      *bool  `json:"retainMissingValue,omitempty"`
	ReplaceMissingValueWith string `json:"replaceMissingValueWith,omitempty"`
	Injective               *bool  `json:"injective,omitempty"`
	Optimize                *bool  `json:"optimize,omitempty"`
}

RegisteredLookup holds the registered lookup extraction function struct based on https://druid.apache.org/docs/latest/querying/dimensionspecs.html#registered-lookup-extraction-function

func NewRegisteredLookup

func NewRegisteredLookup() *RegisteredLookup

func (*RegisteredLookup) SetInjective

func (l *RegisteredLookup) SetInjective(injective bool) *RegisteredLookup

func (*RegisteredLookup) SetLookup

func (l *RegisteredLookup) SetLookup(lookup string) *RegisteredLookup

func (*RegisteredLookup) SetOptimize

func (l *RegisteredLookup) SetOptimize(optimize bool) *RegisteredLookup

func (*RegisteredLookup) SetReplaceMissingValueWith

func (l *RegisteredLookup) SetReplaceMissingValueWith(replaceMissingValueWith string) *RegisteredLookup

func (*RegisteredLookup) SetRetainMissingValue

func (l *RegisteredLookup) SetRetainMissingValue(retainMissingValue bool) *RegisteredLookup

type SearchQuery

type SearchQuery struct {
	Base
	Query builder.SearchQuerySpec `json:"query,omitempty"`
}

func NewSearchQuery

func NewSearchQuery() *SearchQuery

func (*SearchQuery) SetQuery

func (*SearchQuery) UnmarshalJSON

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

type StringFormat

type StringFormat struct {
	Base
	Format       string             `json:"format,omitempty"`
	NullHandling types.NullHandling `json:"nullHandling,omitempty"`
}

func NewStringFormat

func NewStringFormat() *StringFormat

func (*StringFormat) SetFormat

func (s *StringFormat) SetFormat(format string) *StringFormat

func (*StringFormat) SetNullHandling

func (s *StringFormat) SetNullHandling(nullHandling types.NullHandling) *StringFormat

type Strlen

type Strlen struct {
	Base
}

func NewStrlen

func NewStrlen() *Strlen

type Substring

type Substring struct {
	Base
	Index  int64 `json:"index,omitempty"`
	Length int64 `json:"length,omitempty"`
}

func NewSubstring

func NewSubstring() *Substring

func (*Substring) SetIndex

func (s *Substring) SetIndex(index int64) *Substring

func (*Substring) SetLength

func (s *Substring) SetLength(length int64) *Substring

type Time

type Time struct {
	Base
	TimeFormat   string `json:"timeFormat,omitempty"`
	ResultFormat string `json:"resultFormat,omitempty"`
	Joda         *bool  `json:"joda,omitempty"`
}

func NewTime

func NewTime() *Time

func (*Time) SetJoda

func (t *Time) SetJoda(joda bool) *Time

func (*Time) SetResultFormat

func (t *Time) SetResultFormat(resultFormat string) *Time

func (*Time) SetTimeFormat

func (t *Time) SetTimeFormat(timeFormat string) *Time

type TimeFormat

type TimeFormat struct {
	Base
	Format      string              `json:"format,omitempty"`
	TimeZone    types.DateTimeZone  `json:"timeZone,omitempty"`
	Locale      string              `json:"locale,omitempty"`
	Granularity builder.Granularity `json:"granularity,omitempty"`
	AsMillis    *bool               `json:"asMillis,omitempty"`
}

func NewTimeFormat

func NewTimeFormat() *TimeFormat

func (*TimeFormat) SetAsMillis

func (t *TimeFormat) SetAsMillis(asMillis bool) *TimeFormat

func (*TimeFormat) SetFormat

func (t *TimeFormat) SetFormat(format string) *TimeFormat

func (*TimeFormat) SetGranularity

func (t *TimeFormat) SetGranularity(granularity builder.Granularity) *TimeFormat

func (*TimeFormat) SetLocale

func (t *TimeFormat) SetLocale(locale string) *TimeFormat

func (*TimeFormat) SetTimeZone

func (t *TimeFormat) SetTimeZone(timeZone types.DateTimeZone) *TimeFormat

func (*TimeFormat) UnmarshalJSON

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

type Upper

type Upper struct {
	Base
	Locale string `json:"locale,omitempty"`
}

func NewUpper

func NewUpper() *Upper

func (*Upper) SetLocale

func (u *Upper) SetLocale(locale string) *Upper

Jump to

Keyboard shortcuts

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