elasticsearchv8

package
v4.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func C

func C() *elasticsearch.TypedClient

C returns the elasticsearch client singleton

func CheckVersion

func CheckVersion() error

func ConvertFactToSearchRequestV8

func ConvertFactToSearchRequestV8(f engine.Fact, ti time.Time, parameters map[string]string) (*search.Request, error)

func NewPutTemplateRequestV8

func NewPutTemplateRequestV8(indexPatterns []string, model modeler.Model) *puttemplate.Request

NewPutTemplateRequestV8 constructor the ES template

func ReplaceGlobals

func ReplaceGlobals(config elasticsearch.Config) error

ReplaceGlobals affect new elasticsearch credentials and connection to the global repository singleton

Types

type BulkIndexMeta

type BulkIndexMeta struct {
	Index BulkIndexMetaDetail `json:"index"`
}

type BulkIndexMetaDetail

type BulkIndexMetaDetail struct {
	S_Index string `json:"_index"`
	S_Type  string `json:"_type"`
	S_Id    string `json:"_id"`
}

type BulkIndexResponse

type BulkIndexResponse struct {
	Took   int                                 `json:"took,omitempty"`
	Errors bool                                `json:"errors,omitempty"`
	Items  []map[string]*BulkIndexResponseItem `json:"items,omitempty"`
}

func (*BulkIndexResponse) Failed

Failed returns those items of a bulkIndex response that have errors, i.e. those that don't have a status code between 200 and 299.

type BulkIndexResponseItem

type BulkIndexResponseItem struct {
	Status int `json:"status,omitempty"`
}

type Credentials

type Credentials struct {
	URLs []string
}

Credentials is used to store the elasticsearch credentials

Jump to

Keyboard shortcuts

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