extraction

package
v0.0.0-...-23e8124 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketExtraction

type BucketExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Size           int64          `json:"size,omitempty"`
	Offset         int64          `json:"offset,omitempty"`
}

func (BucketExtraction) Type

func (b BucketExtraction) Type() string

type CascadeExtraction

type CascadeExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Extractions    []Extraction   `json:"extractionFns"`
}

func (CascadeExtraction) Type

func (c CascadeExtraction) Type() string

type Extraction

type Extraction interface {
	Type() string
}

type ExtractionType

type ExtractionType int
const (
	Regex ExtractionType = iota
	Partial
	SearchQuery
	Substring
	Strlen
	TimeFormat
	Time
	Javascript
	RegisteredLookup
	Lookup
	Cascade
	StringFormat
	Upper
	Lower
	Bucket
)

func (ExtractionType) MarshalJSON

func (e ExtractionType) MarshalJSON() ([]byte, error)

func (ExtractionType) Name

func (e ExtractionType) Name() string

func (ExtractionType) Ordinal

func (e ExtractionType) Ordinal() int

func (ExtractionType) Values

func (e ExtractionType) Values() *[]string

type JavascriptExtraction

type JavascriptExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Function       string         `json:"function"`
	Injective      bool           `json:"injective,omitempty"`
}

func (JavascriptExtraction) Type

func (j JavascriptExtraction) Type() string

type LookupExtraction

type LookupExtraction struct {
	ExtractionType          ExtractionType `json:"type"`
	Lookup                  lookup.Lookup  `json:"lookup"`
	RetainMissingValue      bool           `json:"retainMissingValue,omitempty"`
	Injective               bool           `json:"injective,omitempty"`
	ReplaceMissingValueWith string         `json:"replaceMissingValueWith,omitempty"`
}

func (LookupExtraction) Type

func (l LookupExtraction) Type() string

type LowerExtraction

type LowerExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Locale         string         `json:"locale,omitempty"`
}

func (LowerExtraction) Type

func (l LowerExtraction) Type() string

type PartialExtraction

type PartialExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Expression     string         `json:"expr"`
}

func (PartialExtraction) Type

func (p PartialExtraction) Type() string

type RegexExtraction

type RegexExtraction struct {
	ExtractionType          ExtractionType `json:"type"`
	Expression              string         `json:"expr"`
	Index                   int            `json:"index,omitempty"`
	ReplaceMissingValue     bool           `json:"replaceMissingValue,omitempty"`
	ReplaceMissingValueWith string         `json:"replaceMissingValueWith,omitempty"`
}

func (RegexExtraction) Type

func (r RegexExtraction) Type() string

type RegisteredLookupExtraction

type RegisteredLookupExtraction struct {
	ExtractionType     ExtractionType `json:"type"`
	Lookup             string         `json:"lookup"`
	RetainMissingValue bool           `json:"retainMissingValue,omitempty"`
}

func (RegisteredLookupExtraction) Type

type SearchQueryExtraction

type SearchQueryExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	SearchQuery    search.Search  `json:"query"`
}

func (SearchQueryExtraction) Type

func (s SearchQueryExtraction) Type() string

type StringFormatExtraction

type StringFormatExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Format         string         `json:"format"`
	NullHandling   string         `json:"nullHandling,omitempty"`
}

func (StringFormatExtraction) Type

func (s StringFormatExtraction) Type() string

type StrlenExtraction

type StrlenExtraction struct {
	ExtractionType ExtractionType `json:"type"`
}

func (StrlenExtraction) Type

func (s StrlenExtraction) Type() string

type SubstringExtraction

type SubstringExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Index          int            `json:"index"`
	Length         int            `json:"length,omitempty"`
}

func (SubstringExtraction) Type

func (s SubstringExtraction) Type() string

type TimeExtraction

type TimeExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	TimeFormat     string         `json:"timeFormat"`
	ResultFormat   string         `json:"resultFormat"`
	Joda           bool           `json:"joda,omitempty"`
}

func (TimeExtraction) Type

func (t TimeExtraction) Type() string

type TimeFormatExtraction

type TimeFormatExtraction struct {
	ExtractionType ExtractionType          `json:"type"`
	Format         string                  `json:"format,omitempty"`
	TimeZone       string                  `json:"timeZone,omitempty"`
	Locale         string                  `json:"locale,omitempty"`
	Granularity    granularity.Granularity `json:"granularity,omitempty"`
	AsMillis       bool                    `json:"asMillis,omitempty"`
}

func (TimeFormatExtraction) Type

func (t TimeFormatExtraction) Type() string

type UpperExtraction

type UpperExtraction struct {
	ExtractionType ExtractionType `json:"type"`
	Locale         string         `json:"locale,omitempty"`
}

func (UpperExtraction) Type

func (u UpperExtraction) Type() string

Jump to

Keyboard shortcuts

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