action

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIndiceAlias

func CreateIndiceAlias(ctx context.Context, client *elastic.Client, element Element) (*elastic.AliasResult, error)

Types

type Command

type Command struct {
	Index          string `json:"_index"`
	Routing        string `json:"_routing,omitempty"`
	Parent         string `json:"_parent,omitempty"`
	Type           string `json:"_type,omitempty"`
	Id             string `json:"_id,omitempty"`
	RetryOnConfict int    `json:"_retry_on_conflict,omitempty"`
	Refresh        string `json:"_refresh,omitempty"`
}

func NewCommand

func NewCommand(e Element) Command

func (Command) String

func (cmd Command) String(key string) string

type Container

type Container struct {
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer() *Container

func (*Container) Add

func (c *Container) Add(element Element)

func (*Container) Clear

func (c *Container) Clear()

func (*Container) Elements

func (c *Container) Elements() []Element

func (*Container) Length

func (c *Container) Length() int

type Element

type Element struct {
	elastic.BulkableRequest

	Method            string      `json:"http_method"`
	Uri               string      `json:"uri"`
	Body              interface{} `json:"body"`
	Routing           string
	Parent            string
	Refresh           string
	WaitForCompletion bool
	RetryOnConflict   int    // only available for create, update
	Conflict          string // only available for update_by_query

	Request     elastic.BulkableRequest
	Index       string
	DocType     string
	DocId       string
	Version     int64
	VersionType string
}

func NewElement

func NewElement(raw []byte) (Element, error)

func (*Element) DeleteByQueryService

func (e *Element) DeleteByQueryService(client *elastic.Client) (*elastic.DeleteByQueryService, error)

func (*Element) IndicesCreateService

func (e *Element) IndicesCreateService(client *elastic.Client) (*elastic.IndicesCreateService, error)

func (*Element) IndicesDeleteService

func (e *Element) IndicesDeleteService(client *elastic.Client) (*elastic.IndicesDeleteService, error)

func (*Element) RequestType

func (e *Element) RequestType() string

func (Element) Source

func (e Element) Source() ([]string, error)

Implement elastic.BulkableRequest interface

func (Element) String

func (e Element) String() string

Implement elastic.BulkableRequest interface

func (*Element) UpdateByQueryService

func (e *Element) UpdateByQueryService(client *elastic.Client) (*elastic.UpdateByQueryService, error)

type SimpleQuery

type SimpleQuery struct {
	// contains filtered or unexported fields
}

func NewSimpleQuery

func NewSimpleQuery(body interface{}) *SimpleQuery

func (*SimpleQuery) Source

func (q *SimpleQuery) Source() (interface{}, error)

Jump to

Keyboard shortcuts

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