esapi

package
Version: v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: Apache-2.0 Imports: 10 Imported by: 31

Documentation

Overview

Package esapi provides the Go API for Elasticsearch.

It is automatically included in the client provided by the github.com/elastic/go-elasticsearch package:

es, _ := elasticsearch.NewDefaultClient()
res, _ := es.Info()
log.Println(res)

For each Elasticsearch API, such as "Index", the package exports two corresponding types: a function and a struct.

The function type allows you to call the Elasticsearch API as a method on the client, passing the parameters as arguments:

res, err := es.Index(
	"test",                                  // Index name
	strings.NewReader(`{"title" : "Test"}`), // Document body
	es.Index.WithDocumentID("1"),            // Document ID
	es.Index.WithRefresh("true"),            // Refresh
)
if err != nil {
	log.Fatalf("ERROR: %s", err)
}
defer res.Body.Close()

log.Println(res)

// => [201 Created] {"_index":"test","_type":"_doc","_id":"1" ...

The struct type allows for a more hands-on approach, where you create a new struct, with the request configuration as fields, and call the Do() method with a context and the client as arguments:

req := esapi.IndexRequest{
	Index:      "test",                                  // Index name
	Body:       strings.NewReader(`{"title" : "Test"}`), // Document body
	DocumentID: "1",                                     // Document ID
	Refresh:    "true",                                  // Refresh
}

res, err := req.Do(context.Background(), es)
if err != nil {
	log.Fatalf("Error getting response: %s", err)
}
defer res.Body.Close()

log.Println(res)

// => [200 OK] {"_index":"test","_type":"_doc","_id":"1","_version":2 ...

The function type is a wrapper around the struct, and allows to configure and perform the request in a more expressive way. It has a minor overhead compared to using a struct directly; refer to the esapi_benchmark_test.go suite for concrete numbers.

See the documentation for each API function or struct at https://godoc.org/github.com/elastic/go-elasticsearch, or locally by:

go doc github.com/elastic/go-elasticsearch/esapi Index
go doc github.com/elastic/go-elasticsearch/esapi IndexRequest

Response

The esapi.Response type is a lightweight wrapper around http.Response.

The res.Body field is an io.ReadCloser, leaving the JSON parsing to the calling code, in the interest of performance and flexibility (eg. to allow using a custom JSON parser).

It is imperative to close the response body for a non-nil response.

The Response type implements a couple of convenience methods for accessing the status, checking an error status code or printing the response body for debugging purposes.

Additional Information

See the Elasticsearch documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/api-conventions.html for detailed information about the API endpoints and parameters.

The Go API is generated from the Elasticsearch JSON specification at https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api by the internal package available at https://github.com/elastic/go-elasticsearch/tree/master/internal/cmd/generate/commands.

The API is tested by integration tests common to all Elasticsearch official clients, generated from the source at https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test. The generator is provided by the internal package internal/cmd/generate.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(v bool) *bool

BoolPtr returns a pointer to v.

It is used as a convenience function for converting a bool value into a pointer when passing the value to a function or struct field which expects a pointer.

func IntPtr

func IntPtr(v int) *int

IntPtr returns a pointer to v.

It is used as a convenience function for converting an int value into a pointer when passing the value to a function or struct field which expects a pointer.

Types

type API

type API struct {
	Cat      *Cat
	Cluster  *Cluster
	Indices  *Indices
	Ingest   *Ingest
	Nodes    *Nodes
	Remote   *Remote
	Snapshot *Snapshot
	Tasks    *Tasks

	Bulk                    Bulk
	ClearScroll             ClearScroll
	Count                   Count
	Create                  Create
	Delete                  Delete
	DeleteByQuery           DeleteByQuery
	DeleteByQueryRethrottle DeleteByQueryRethrottle
	DeleteScript            DeleteScript
	Exists                  Exists
	ExistsSource            ExistsSource
	Explain                 Explain
	FieldCaps               FieldCaps
	Get                     Get
	GetScript               GetScript
	GetSource               GetSource
	Index                   Index
	Info                    Info
	Mget                    Mget
	Msearch                 Msearch
	MsearchTemplate         MsearchTemplate
	Mtermvectors            Mtermvectors
	Ping                    Ping
	PutScript               PutScript
	RankEval                RankEval
	Reindex                 Reindex
	ReindexRethrottle       ReindexRethrottle
	RenderSearchTemplate    RenderSearchTemplate
	ScriptsPainlessExecute  ScriptsPainlessExecute
	Scroll                  Scroll
	Search                  Search
	SearchShards            SearchShards
	SearchTemplate          SearchTemplate
	Termvectors             Termvectors
	Update                  Update
	UpdateByQuery           UpdateByQuery
	UpdateByQueryRethrottle UpdateByQueryRethrottle
}

API contains the Elasticsearch APIs

func New

func New(t Transport) *API

New creates new API

type Bulk

type Bulk func(body io.Reader, o ...func(*BulkRequest)) (*Response, error)

Bulk allows to perform multiple index/update/delete operations in a single request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html.

func (Bulk) WithContext

func (f Bulk) WithContext(v context.Context) func(*BulkRequest)

WithContext sets the request context.

func (Bulk) WithDocumentType

func (f Bulk) WithDocumentType(v string) func(*BulkRequest)

WithDocumentType - default document type for items which don't provide one.

func (Bulk) WithErrorTrace

func (f Bulk) WithErrorTrace() func(*BulkRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Bulk) WithFilterPath

func (f Bulk) WithFilterPath(v ...string) func(*BulkRequest)

WithFilterPath filters the properties of the response body.

func (Bulk) WithHuman

func (f Bulk) WithHuman() func(*BulkRequest)

WithHuman makes statistical values human-readable.

func (Bulk) WithIndex

func (f Bulk) WithIndex(v string) func(*BulkRequest)

WithIndex - default index for items which don't provide one.

func (Bulk) WithPipeline

func (f Bulk) WithPipeline(v string) func(*BulkRequest)

WithPipeline - the pipeline ID to preprocess incoming documents with.

func (Bulk) WithPretty

func (f Bulk) WithPretty() func(*BulkRequest)

WithPretty makes the response body pretty-printed.

func (Bulk) WithRefresh

func (f Bulk) WithRefresh(v string) func(*BulkRequest)

WithRefresh - if `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Bulk) WithRouting

func (f Bulk) WithRouting(v string) func(*BulkRequest)

WithRouting - specific routing value.

func (Bulk) WithSource

func (f Bulk) WithSource(v ...string) func(*BulkRequest)

WithSource - true or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request.

func (Bulk) WithSourceExcludes

func (f Bulk) WithSourceExcludes(v ...string) func(*BulkRequest)

WithSourceExcludes - default list of fields to exclude from the returned _source field, can be overridden on each sub-request.

func (Bulk) WithSourceIncludes

func (f Bulk) WithSourceIncludes(v ...string) func(*BulkRequest)

WithSourceIncludes - default list of fields to extract and return from the _source field, can be overridden on each sub-request.

func (Bulk) WithTimeout

func (f Bulk) WithTimeout(v time.Duration) func(*BulkRequest)

WithTimeout - explicit operation timeout.

func (Bulk) WithWaitForActiveShards

func (f Bulk) WithWaitForActiveShards(v string) func(*BulkRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the bulk operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

type BulkRequest

type BulkRequest struct {
	Index        string
	DocumentType string
	Body         io.Reader

	Pipeline            string
	Refresh             string
	Routing             string
	Source              []string
	SourceExcludes      []string
	SourceIncludes      []string
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

BulkRequest configures the Bulk API request.

func (BulkRequest) Do

func (r BulkRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Cat

type Cat struct {
	Aliases      CatAliases
	Allocation   CatAllocation
	Count        CatCount
	Fielddata    CatFielddata
	Health       CatHealth
	Help         CatHelp
	Indices      CatIndices
	Master       CatMaster
	Nodeattrs    CatNodeattrs
	Nodes        CatNodes
	PendingTasks CatPendingTasks
	Plugins      CatPlugins
	Recovery     CatRecovery
	Repositories CatRepositories
	Segments     CatSegments
	Shards       CatShards
	Snapshots    CatSnapshots
	Tasks        CatTasks
	Templates    CatTemplates
	ThreadPool   CatThreadPool
}

Cat contains the Cat APIs

type CatAliases

type CatAliases func(o ...func(*CatAliasesRequest)) (*Response, error)

CatAliases shows information about currently configured aliases to indices including filter and routing infos.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html.

func (CatAliases) WithContext

func (f CatAliases) WithContext(v context.Context) func(*CatAliasesRequest)

WithContext sets the request context.

func (CatAliases) WithErrorTrace

func (f CatAliases) WithErrorTrace() func(*CatAliasesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatAliases) WithFilterPath

func (f CatAliases) WithFilterPath(v ...string) func(*CatAliasesRequest)

WithFilterPath filters the properties of the response body.

func (CatAliases) WithFormat

func (f CatAliases) WithFormat(v string) func(*CatAliasesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatAliases) WithH

func (f CatAliases) WithH(v ...string) func(*CatAliasesRequest)

WithH - comma-separated list of column names to display.

func (CatAliases) WithHelp

func (f CatAliases) WithHelp(v bool) func(*CatAliasesRequest)

WithHelp - return help information.

func (CatAliases) WithHuman

func (f CatAliases) WithHuman() func(*CatAliasesRequest)

WithHuman makes statistical values human-readable.

func (CatAliases) WithLocal

func (f CatAliases) WithLocal(v bool) func(*CatAliasesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatAliases) WithMasterTimeout

func (f CatAliases) WithMasterTimeout(v time.Duration) func(*CatAliasesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatAliases) WithName

func (f CatAliases) WithName(v ...string) func(*CatAliasesRequest)

WithName - a list of alias names to return.

func (CatAliases) WithPretty

func (f CatAliases) WithPretty() func(*CatAliasesRequest)

WithPretty makes the response body pretty-printed.

func (CatAliases) WithS

func (f CatAliases) WithS(v ...string) func(*CatAliasesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatAliases) WithV

func (f CatAliases) WithV(v bool) func(*CatAliasesRequest)

WithV - verbose mode. display column headers.

type CatAliasesRequest

type CatAliasesRequest struct {
	Name          []string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatAliasesRequest configures the Cat Aliases API request.

func (CatAliasesRequest) Do

func (r CatAliasesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatAllocation

type CatAllocation func(o ...func(*CatAllocationRequest)) (*Response, error)

CatAllocation provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html.

func (CatAllocation) WithBytes

func (f CatAllocation) WithBytes(v string) func(*CatAllocationRequest)

WithBytes - the unit in which to display byte values.

func (CatAllocation) WithContext

func (f CatAllocation) WithContext(v context.Context) func(*CatAllocationRequest)

WithContext sets the request context.

func (CatAllocation) WithErrorTrace

func (f CatAllocation) WithErrorTrace() func(*CatAllocationRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatAllocation) WithFilterPath

func (f CatAllocation) WithFilterPath(v ...string) func(*CatAllocationRequest)

WithFilterPath filters the properties of the response body.

func (CatAllocation) WithFormat

func (f CatAllocation) WithFormat(v string) func(*CatAllocationRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatAllocation) WithH

func (f CatAllocation) WithH(v ...string) func(*CatAllocationRequest)

WithH - comma-separated list of column names to display.

func (CatAllocation) WithHelp

func (f CatAllocation) WithHelp(v bool) func(*CatAllocationRequest)

WithHelp - return help information.

func (CatAllocation) WithHuman

func (f CatAllocation) WithHuman() func(*CatAllocationRequest)

WithHuman makes statistical values human-readable.

func (CatAllocation) WithLocal

func (f CatAllocation) WithLocal(v bool) func(*CatAllocationRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatAllocation) WithMasterTimeout

func (f CatAllocation) WithMasterTimeout(v time.Duration) func(*CatAllocationRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatAllocation) WithNodeID

func (f CatAllocation) WithNodeID(v ...string) func(*CatAllocationRequest)

WithNodeID - a list of node ids or names to limit the returned information.

func (CatAllocation) WithPretty

func (f CatAllocation) WithPretty() func(*CatAllocationRequest)

WithPretty makes the response body pretty-printed.

func (CatAllocation) WithS

func (f CatAllocation) WithS(v ...string) func(*CatAllocationRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatAllocation) WithV

func (f CatAllocation) WithV(v bool) func(*CatAllocationRequest)

WithV - verbose mode. display column headers.

type CatAllocationRequest

type CatAllocationRequest struct {
	NodeID        []string
	Bytes         string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatAllocationRequest configures the Cat Allocation API request.

func (CatAllocationRequest) Do

func (r CatAllocationRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatCount

type CatCount func(o ...func(*CatCountRequest)) (*Response, error)

CatCount provides quick access to the document count of the entire cluster, or individual indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html.

func (CatCount) WithContext

func (f CatCount) WithContext(v context.Context) func(*CatCountRequest)

WithContext sets the request context.

func (CatCount) WithErrorTrace

func (f CatCount) WithErrorTrace() func(*CatCountRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatCount) WithFilterPath

func (f CatCount) WithFilterPath(v ...string) func(*CatCountRequest)

WithFilterPath filters the properties of the response body.

func (CatCount) WithFormat

func (f CatCount) WithFormat(v string) func(*CatCountRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatCount) WithH

func (f CatCount) WithH(v ...string) func(*CatCountRequest)

WithH - comma-separated list of column names to display.

func (CatCount) WithHelp

func (f CatCount) WithHelp(v bool) func(*CatCountRequest)

WithHelp - return help information.

func (CatCount) WithHuman

func (f CatCount) WithHuman() func(*CatCountRequest)

WithHuman makes statistical values human-readable.

func (CatCount) WithIndex

func (f CatCount) WithIndex(v ...string) func(*CatCountRequest)

WithIndex - a list of index names to limit the returned information.

func (CatCount) WithLocal

func (f CatCount) WithLocal(v bool) func(*CatCountRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatCount) WithMasterTimeout

func (f CatCount) WithMasterTimeout(v time.Duration) func(*CatCountRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatCount) WithPretty

func (f CatCount) WithPretty() func(*CatCountRequest)

WithPretty makes the response body pretty-printed.

func (CatCount) WithS

func (f CatCount) WithS(v ...string) func(*CatCountRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatCount) WithV

func (f CatCount) WithV(v bool) func(*CatCountRequest)

WithV - verbose mode. display column headers.

type CatCountRequest

type CatCountRequest struct {
	Index []string

	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatCountRequest configures the Cat Count API request.

func (CatCountRequest) Do

func (r CatCountRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatFielddata

type CatFielddata func(o ...func(*CatFielddataRequest)) (*Response, error)

CatFielddata shows how much heap memory is currently being used by fielddata on every data node in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html.

func (CatFielddata) WithBytes

func (f CatFielddata) WithBytes(v string) func(*CatFielddataRequest)

WithBytes - the unit in which to display byte values.

func (CatFielddata) WithContext

func (f CatFielddata) WithContext(v context.Context) func(*CatFielddataRequest)

WithContext sets the request context.

func (CatFielddata) WithErrorTrace

func (f CatFielddata) WithErrorTrace() func(*CatFielddataRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatFielddata) WithFields

func (f CatFielddata) WithFields(v ...string) func(*CatFielddataRequest)

WithFields - a list of fields to return the fielddata size.

func (CatFielddata) WithFilterPath

func (f CatFielddata) WithFilterPath(v ...string) func(*CatFielddataRequest)

WithFilterPath filters the properties of the response body.

func (CatFielddata) WithFormat

func (f CatFielddata) WithFormat(v string) func(*CatFielddataRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatFielddata) WithH

func (f CatFielddata) WithH(v ...string) func(*CatFielddataRequest)

WithH - comma-separated list of column names to display.

func (CatFielddata) WithHelp

func (f CatFielddata) WithHelp(v bool) func(*CatFielddataRequest)

WithHelp - return help information.

func (CatFielddata) WithHuman

func (f CatFielddata) WithHuman() func(*CatFielddataRequest)

WithHuman makes statistical values human-readable.

func (CatFielddata) WithLocal

func (f CatFielddata) WithLocal(v bool) func(*CatFielddataRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatFielddata) WithMasterTimeout

func (f CatFielddata) WithMasterTimeout(v time.Duration) func(*CatFielddataRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatFielddata) WithPretty

func (f CatFielddata) WithPretty() func(*CatFielddataRequest)

WithPretty makes the response body pretty-printed.

func (CatFielddata) WithS

func (f CatFielddata) WithS(v ...string) func(*CatFielddataRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatFielddata) WithV

func (f CatFielddata) WithV(v bool) func(*CatFielddataRequest)

WithV - verbose mode. display column headers.

type CatFielddataRequest

type CatFielddataRequest struct {
	Fields        []string
	Bytes         string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatFielddataRequest configures the Cat Fielddata API request.

func (CatFielddataRequest) Do

func (r CatFielddataRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatHealth

type CatHealth func(o ...func(*CatHealthRequest)) (*Response, error)

CatHealth returns a concise representation of the cluster health.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html.

func (CatHealth) WithContext

func (f CatHealth) WithContext(v context.Context) func(*CatHealthRequest)

WithContext sets the request context.

func (CatHealth) WithErrorTrace

func (f CatHealth) WithErrorTrace() func(*CatHealthRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatHealth) WithFilterPath

func (f CatHealth) WithFilterPath(v ...string) func(*CatHealthRequest)

WithFilterPath filters the properties of the response body.

func (CatHealth) WithFormat

func (f CatHealth) WithFormat(v string) func(*CatHealthRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatHealth) WithH

func (f CatHealth) WithH(v ...string) func(*CatHealthRequest)

WithH - comma-separated list of column names to display.

func (CatHealth) WithHelp

func (f CatHealth) WithHelp(v bool) func(*CatHealthRequest)

WithHelp - return help information.

func (CatHealth) WithHuman

func (f CatHealth) WithHuman() func(*CatHealthRequest)

WithHuman makes statistical values human-readable.

func (CatHealth) WithLocal

func (f CatHealth) WithLocal(v bool) func(*CatHealthRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatHealth) WithMasterTimeout

func (f CatHealth) WithMasterTimeout(v time.Duration) func(*CatHealthRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatHealth) WithPretty

func (f CatHealth) WithPretty() func(*CatHealthRequest)

WithPretty makes the response body pretty-printed.

func (CatHealth) WithS

func (f CatHealth) WithS(v ...string) func(*CatHealthRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatHealth) WithTs

func (f CatHealth) WithTs(v bool) func(*CatHealthRequest)

WithTs - set to false to disable timestamping.

func (CatHealth) WithV

func (f CatHealth) WithV(v bool) func(*CatHealthRequest)

WithV - verbose mode. display column headers.

type CatHealthRequest

type CatHealthRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	Ts            *bool
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatHealthRequest configures the Cat Health API request.

func (CatHealthRequest) Do

func (r CatHealthRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatHelp

type CatHelp func(o ...func(*CatHelpRequest)) (*Response, error)

CatHelp returns help for the Cat APIs.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html.

func (CatHelp) WithContext

func (f CatHelp) WithContext(v context.Context) func(*CatHelpRequest)

WithContext sets the request context.

func (CatHelp) WithErrorTrace

func (f CatHelp) WithErrorTrace() func(*CatHelpRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatHelp) WithFilterPath

func (f CatHelp) WithFilterPath(v ...string) func(*CatHelpRequest)

WithFilterPath filters the properties of the response body.

func (CatHelp) WithHelp

func (f CatHelp) WithHelp(v bool) func(*CatHelpRequest)

WithHelp - return help information.

func (CatHelp) WithHuman

func (f CatHelp) WithHuman() func(*CatHelpRequest)

WithHuman makes statistical values human-readable.

func (CatHelp) WithPretty

func (f CatHelp) WithPretty() func(*CatHelpRequest)

WithPretty makes the response body pretty-printed.

func (CatHelp) WithS

func (f CatHelp) WithS(v ...string) func(*CatHelpRequest)

WithS - comma-separated list of column names or column aliases to sort by.

type CatHelpRequest

type CatHelpRequest struct {
	Help *bool
	S    []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatHelpRequest configures the Cat Help API request.

func (CatHelpRequest) Do

func (r CatHelpRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatIndices

type CatIndices func(o ...func(*CatIndicesRequest)) (*Response, error)

CatIndices returns information about indices: number of primaries and replicas, document counts, disk size, ...

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html.

func (CatIndices) WithBytes

func (f CatIndices) WithBytes(v string) func(*CatIndicesRequest)

WithBytes - the unit in which to display byte values.

func (CatIndices) WithContext

func (f CatIndices) WithContext(v context.Context) func(*CatIndicesRequest)

WithContext sets the request context.

func (CatIndices) WithErrorTrace

func (f CatIndices) WithErrorTrace() func(*CatIndicesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatIndices) WithFilterPath

func (f CatIndices) WithFilterPath(v ...string) func(*CatIndicesRequest)

WithFilterPath filters the properties of the response body.

func (CatIndices) WithFormat

func (f CatIndices) WithFormat(v string) func(*CatIndicesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatIndices) WithH

func (f CatIndices) WithH(v ...string) func(*CatIndicesRequest)

WithH - comma-separated list of column names to display.

func (CatIndices) WithHealth

func (f CatIndices) WithHealth(v string) func(*CatIndicesRequest)

WithHealth - a health status ("green", "yellow", or "red" to filter only indices matching the specified health status.

func (CatIndices) WithHelp

func (f CatIndices) WithHelp(v bool) func(*CatIndicesRequest)

WithHelp - return help information.

func (CatIndices) WithHuman

func (f CatIndices) WithHuman() func(*CatIndicesRequest)

WithHuman makes statistical values human-readable.

func (CatIndices) WithIndex

func (f CatIndices) WithIndex(v ...string) func(*CatIndicesRequest)

WithIndex - a list of index names to limit the returned information.

func (CatIndices) WithLocal

func (f CatIndices) WithLocal(v bool) func(*CatIndicesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatIndices) WithMasterTimeout

func (f CatIndices) WithMasterTimeout(v time.Duration) func(*CatIndicesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatIndices) WithPretty

func (f CatIndices) WithPretty() func(*CatIndicesRequest)

WithPretty makes the response body pretty-printed.

func (CatIndices) WithPri

func (f CatIndices) WithPri(v bool) func(*CatIndicesRequest)

WithPri - set to true to return stats only for primary shards.

func (CatIndices) WithS

func (f CatIndices) WithS(v ...string) func(*CatIndicesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatIndices) WithV

func (f CatIndices) WithV(v bool) func(*CatIndicesRequest)

WithV - verbose mode. display column headers.

type CatIndicesRequest

type CatIndicesRequest struct {
	Index []string

	Bytes         string
	Format        string
	H             []string
	Health        string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	Pri           *bool
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatIndicesRequest configures the Cat Indices API request.

func (CatIndicesRequest) Do

func (r CatIndicesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatMaster

type CatMaster func(o ...func(*CatMasterRequest)) (*Response, error)

CatMaster returns information about the master node.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html.

func (CatMaster) WithContext

func (f CatMaster) WithContext(v context.Context) func(*CatMasterRequest)

WithContext sets the request context.

func (CatMaster) WithErrorTrace

func (f CatMaster) WithErrorTrace() func(*CatMasterRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatMaster) WithFilterPath

func (f CatMaster) WithFilterPath(v ...string) func(*CatMasterRequest)

WithFilterPath filters the properties of the response body.

func (CatMaster) WithFormat

func (f CatMaster) WithFormat(v string) func(*CatMasterRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatMaster) WithH

func (f CatMaster) WithH(v ...string) func(*CatMasterRequest)

WithH - comma-separated list of column names to display.

func (CatMaster) WithHelp

func (f CatMaster) WithHelp(v bool) func(*CatMasterRequest)

WithHelp - return help information.

func (CatMaster) WithHuman

func (f CatMaster) WithHuman() func(*CatMasterRequest)

WithHuman makes statistical values human-readable.

func (CatMaster) WithLocal

func (f CatMaster) WithLocal(v bool) func(*CatMasterRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatMaster) WithMasterTimeout

func (f CatMaster) WithMasterTimeout(v time.Duration) func(*CatMasterRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatMaster) WithPretty

func (f CatMaster) WithPretty() func(*CatMasterRequest)

WithPretty makes the response body pretty-printed.

func (CatMaster) WithS

func (f CatMaster) WithS(v ...string) func(*CatMasterRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatMaster) WithV

func (f CatMaster) WithV(v bool) func(*CatMasterRequest)

WithV - verbose mode. display column headers.

type CatMasterRequest

type CatMasterRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatMasterRequest configures the Cat Master API request.

func (CatMasterRequest) Do

func (r CatMasterRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatNodeattrs

type CatNodeattrs func(o ...func(*CatNodeattrsRequest)) (*Response, error)

CatNodeattrs returns information about custom node attributes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html.

func (CatNodeattrs) WithContext

func (f CatNodeattrs) WithContext(v context.Context) func(*CatNodeattrsRequest)

WithContext sets the request context.

func (CatNodeattrs) WithErrorTrace

func (f CatNodeattrs) WithErrorTrace() func(*CatNodeattrsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatNodeattrs) WithFilterPath

func (f CatNodeattrs) WithFilterPath(v ...string) func(*CatNodeattrsRequest)

WithFilterPath filters the properties of the response body.

func (CatNodeattrs) WithFormat

func (f CatNodeattrs) WithFormat(v string) func(*CatNodeattrsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatNodeattrs) WithH

func (f CatNodeattrs) WithH(v ...string) func(*CatNodeattrsRequest)

WithH - comma-separated list of column names to display.

func (CatNodeattrs) WithHelp

func (f CatNodeattrs) WithHelp(v bool) func(*CatNodeattrsRequest)

WithHelp - return help information.

func (CatNodeattrs) WithHuman

func (f CatNodeattrs) WithHuman() func(*CatNodeattrsRequest)

WithHuman makes statistical values human-readable.

func (CatNodeattrs) WithLocal

func (f CatNodeattrs) WithLocal(v bool) func(*CatNodeattrsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatNodeattrs) WithMasterTimeout

func (f CatNodeattrs) WithMasterTimeout(v time.Duration) func(*CatNodeattrsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatNodeattrs) WithPretty

func (f CatNodeattrs) WithPretty() func(*CatNodeattrsRequest)

WithPretty makes the response body pretty-printed.

func (CatNodeattrs) WithS

func (f CatNodeattrs) WithS(v ...string) func(*CatNodeattrsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatNodeattrs) WithV

func (f CatNodeattrs) WithV(v bool) func(*CatNodeattrsRequest)

WithV - verbose mode. display column headers.

type CatNodeattrsRequest

type CatNodeattrsRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatNodeattrsRequest configures the Cat Nodeattrs API request.

func (CatNodeattrsRequest) Do

func (r CatNodeattrsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatNodes

type CatNodes func(o ...func(*CatNodesRequest)) (*Response, error)

CatNodes returns basic statistics about performance of cluster nodes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html.

func (CatNodes) WithContext

func (f CatNodes) WithContext(v context.Context) func(*CatNodesRequest)

WithContext sets the request context.

func (CatNodes) WithErrorTrace

func (f CatNodes) WithErrorTrace() func(*CatNodesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatNodes) WithFilterPath

func (f CatNodes) WithFilterPath(v ...string) func(*CatNodesRequest)

WithFilterPath filters the properties of the response body.

func (CatNodes) WithFormat

func (f CatNodes) WithFormat(v string) func(*CatNodesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatNodes) WithFullID

func (f CatNodes) WithFullID(v bool) func(*CatNodesRequest)

WithFullID - return the full node ID instead of the shortened version (default: false).

func (CatNodes) WithH

func (f CatNodes) WithH(v ...string) func(*CatNodesRequest)

WithH - comma-separated list of column names to display.

func (CatNodes) WithHelp

func (f CatNodes) WithHelp(v bool) func(*CatNodesRequest)

WithHelp - return help information.

func (CatNodes) WithHuman

func (f CatNodes) WithHuman() func(*CatNodesRequest)

WithHuman makes statistical values human-readable.

func (CatNodes) WithLocal

func (f CatNodes) WithLocal(v bool) func(*CatNodesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatNodes) WithMasterTimeout

func (f CatNodes) WithMasterTimeout(v time.Duration) func(*CatNodesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatNodes) WithPretty

func (f CatNodes) WithPretty() func(*CatNodesRequest)

WithPretty makes the response body pretty-printed.

func (CatNodes) WithS

func (f CatNodes) WithS(v ...string) func(*CatNodesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatNodes) WithV

func (f CatNodes) WithV(v bool) func(*CatNodesRequest)

WithV - verbose mode. display column headers.

type CatNodesRequest

type CatNodesRequest struct {
	Format        string
	FullID        *bool
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatNodesRequest configures the Cat Nodes API request.

func (CatNodesRequest) Do

func (r CatNodesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatPendingTasks

type CatPendingTasks func(o ...func(*CatPendingTasksRequest)) (*Response, error)

CatPendingTasks returns a concise representation of the cluster pending tasks.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html.

func (CatPendingTasks) WithContext

func (f CatPendingTasks) WithContext(v context.Context) func(*CatPendingTasksRequest)

WithContext sets the request context.

func (CatPendingTasks) WithErrorTrace

func (f CatPendingTasks) WithErrorTrace() func(*CatPendingTasksRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatPendingTasks) WithFilterPath

func (f CatPendingTasks) WithFilterPath(v ...string) func(*CatPendingTasksRequest)

WithFilterPath filters the properties of the response body.

func (CatPendingTasks) WithFormat

func (f CatPendingTasks) WithFormat(v string) func(*CatPendingTasksRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatPendingTasks) WithH

func (f CatPendingTasks) WithH(v ...string) func(*CatPendingTasksRequest)

WithH - comma-separated list of column names to display.

func (CatPendingTasks) WithHelp

func (f CatPendingTasks) WithHelp(v bool) func(*CatPendingTasksRequest)

WithHelp - return help information.

func (CatPendingTasks) WithHuman

func (f CatPendingTasks) WithHuman() func(*CatPendingTasksRequest)

WithHuman makes statistical values human-readable.

func (CatPendingTasks) WithLocal

func (f CatPendingTasks) WithLocal(v bool) func(*CatPendingTasksRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatPendingTasks) WithMasterTimeout

func (f CatPendingTasks) WithMasterTimeout(v time.Duration) func(*CatPendingTasksRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatPendingTasks) WithPretty

func (f CatPendingTasks) WithPretty() func(*CatPendingTasksRequest)

WithPretty makes the response body pretty-printed.

func (CatPendingTasks) WithS

func (f CatPendingTasks) WithS(v ...string) func(*CatPendingTasksRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatPendingTasks) WithV

func (f CatPendingTasks) WithV(v bool) func(*CatPendingTasksRequest)

WithV - verbose mode. display column headers.

type CatPendingTasksRequest

type CatPendingTasksRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatPendingTasksRequest configures the Cat Pending Tasks API request.

func (CatPendingTasksRequest) Do

func (r CatPendingTasksRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatPlugins

type CatPlugins func(o ...func(*CatPluginsRequest)) (*Response, error)

CatPlugins returns information about installed plugins across nodes node.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html.

func (CatPlugins) WithContext

func (f CatPlugins) WithContext(v context.Context) func(*CatPluginsRequest)

WithContext sets the request context.

func (CatPlugins) WithErrorTrace

func (f CatPlugins) WithErrorTrace() func(*CatPluginsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatPlugins) WithFilterPath

func (f CatPlugins) WithFilterPath(v ...string) func(*CatPluginsRequest)

WithFilterPath filters the properties of the response body.

func (CatPlugins) WithFormat

func (f CatPlugins) WithFormat(v string) func(*CatPluginsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatPlugins) WithH

func (f CatPlugins) WithH(v ...string) func(*CatPluginsRequest)

WithH - comma-separated list of column names to display.

func (CatPlugins) WithHelp

func (f CatPlugins) WithHelp(v bool) func(*CatPluginsRequest)

WithHelp - return help information.

func (CatPlugins) WithHuman

func (f CatPlugins) WithHuman() func(*CatPluginsRequest)

WithHuman makes statistical values human-readable.

func (CatPlugins) WithLocal

func (f CatPlugins) WithLocal(v bool) func(*CatPluginsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatPlugins) WithMasterTimeout

func (f CatPlugins) WithMasterTimeout(v time.Duration) func(*CatPluginsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatPlugins) WithPretty

func (f CatPlugins) WithPretty() func(*CatPluginsRequest)

WithPretty makes the response body pretty-printed.

func (CatPlugins) WithS

func (f CatPlugins) WithS(v ...string) func(*CatPluginsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatPlugins) WithV

func (f CatPlugins) WithV(v bool) func(*CatPluginsRequest)

WithV - verbose mode. display column headers.

type CatPluginsRequest

type CatPluginsRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatPluginsRequest configures the Cat Plugins API request.

func (CatPluginsRequest) Do

func (r CatPluginsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatRecovery

type CatRecovery func(o ...func(*CatRecoveryRequest)) (*Response, error)

CatRecovery returns information about index shard recoveries, both on-going completed.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html.

func (CatRecovery) WithBytes

func (f CatRecovery) WithBytes(v string) func(*CatRecoveryRequest)

WithBytes - the unit in which to display byte values.

func (CatRecovery) WithContext

func (f CatRecovery) WithContext(v context.Context) func(*CatRecoveryRequest)

WithContext sets the request context.

func (CatRecovery) WithErrorTrace

func (f CatRecovery) WithErrorTrace() func(*CatRecoveryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatRecovery) WithFilterPath

func (f CatRecovery) WithFilterPath(v ...string) func(*CatRecoveryRequest)

WithFilterPath filters the properties of the response body.

func (CatRecovery) WithFormat

func (f CatRecovery) WithFormat(v string) func(*CatRecoveryRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatRecovery) WithH

func (f CatRecovery) WithH(v ...string) func(*CatRecoveryRequest)

WithH - comma-separated list of column names to display.

func (CatRecovery) WithHelp

func (f CatRecovery) WithHelp(v bool) func(*CatRecoveryRequest)

WithHelp - return help information.

func (CatRecovery) WithHuman

func (f CatRecovery) WithHuman() func(*CatRecoveryRequest)

WithHuman makes statistical values human-readable.

func (CatRecovery) WithIndex

func (f CatRecovery) WithIndex(v ...string) func(*CatRecoveryRequest)

WithIndex - a list of index names to limit the returned information.

func (CatRecovery) WithMasterTimeout

func (f CatRecovery) WithMasterTimeout(v time.Duration) func(*CatRecoveryRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatRecovery) WithPretty

func (f CatRecovery) WithPretty() func(*CatRecoveryRequest)

WithPretty makes the response body pretty-printed.

func (CatRecovery) WithS

func (f CatRecovery) WithS(v ...string) func(*CatRecoveryRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatRecovery) WithV

func (f CatRecovery) WithV(v bool) func(*CatRecoveryRequest)

WithV - verbose mode. display column headers.

type CatRecoveryRequest

type CatRecoveryRequest struct {
	Index []string

	Bytes         string
	Format        string
	H             []string
	Help          *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatRecoveryRequest configures the Cat Recovery API request.

func (CatRecoveryRequest) Do

func (r CatRecoveryRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatRepositories

type CatRepositories func(o ...func(*CatRepositoriesRequest)) (*Response, error)

CatRepositories returns information about snapshot repositories registered in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html.

func (CatRepositories) WithContext

func (f CatRepositories) WithContext(v context.Context) func(*CatRepositoriesRequest)

WithContext sets the request context.

func (CatRepositories) WithErrorTrace

func (f CatRepositories) WithErrorTrace() func(*CatRepositoriesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatRepositories) WithFilterPath

func (f CatRepositories) WithFilterPath(v ...string) func(*CatRepositoriesRequest)

WithFilterPath filters the properties of the response body.

func (CatRepositories) WithFormat

func (f CatRepositories) WithFormat(v string) func(*CatRepositoriesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatRepositories) WithH

func (f CatRepositories) WithH(v ...string) func(*CatRepositoriesRequest)

WithH - comma-separated list of column names to display.

func (CatRepositories) WithHelp

func (f CatRepositories) WithHelp(v bool) func(*CatRepositoriesRequest)

WithHelp - return help information.

func (CatRepositories) WithHuman

func (f CatRepositories) WithHuman() func(*CatRepositoriesRequest)

WithHuman makes statistical values human-readable.

func (CatRepositories) WithLocal

func (f CatRepositories) WithLocal(v bool) func(*CatRepositoriesRequest)

WithLocal - return local information, do not retrieve the state from master node.

func (CatRepositories) WithMasterTimeout

func (f CatRepositories) WithMasterTimeout(v time.Duration) func(*CatRepositoriesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatRepositories) WithPretty

func (f CatRepositories) WithPretty() func(*CatRepositoriesRequest)

WithPretty makes the response body pretty-printed.

func (CatRepositories) WithS

func (f CatRepositories) WithS(v ...string) func(*CatRepositoriesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatRepositories) WithV

func (f CatRepositories) WithV(v bool) func(*CatRepositoriesRequest)

WithV - verbose mode. display column headers.

type CatRepositoriesRequest

type CatRepositoriesRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatRepositoriesRequest configures the Cat Repositories API request.

func (CatRepositoriesRequest) Do

func (r CatRepositoriesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatSegments

type CatSegments func(o ...func(*CatSegmentsRequest)) (*Response, error)

CatSegments provides low-level information about the segments in the shards of an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html.

func (CatSegments) WithBytes

func (f CatSegments) WithBytes(v string) func(*CatSegmentsRequest)

WithBytes - the unit in which to display byte values.

func (CatSegments) WithContext

func (f CatSegments) WithContext(v context.Context) func(*CatSegmentsRequest)

WithContext sets the request context.

func (CatSegments) WithErrorTrace

func (f CatSegments) WithErrorTrace() func(*CatSegmentsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatSegments) WithFilterPath

func (f CatSegments) WithFilterPath(v ...string) func(*CatSegmentsRequest)

WithFilterPath filters the properties of the response body.

func (CatSegments) WithFormat

func (f CatSegments) WithFormat(v string) func(*CatSegmentsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatSegments) WithH

func (f CatSegments) WithH(v ...string) func(*CatSegmentsRequest)

WithH - comma-separated list of column names to display.

func (CatSegments) WithHelp

func (f CatSegments) WithHelp(v bool) func(*CatSegmentsRequest)

WithHelp - return help information.

func (CatSegments) WithHuman

func (f CatSegments) WithHuman() func(*CatSegmentsRequest)

WithHuman makes statistical values human-readable.

func (CatSegments) WithIndex

func (f CatSegments) WithIndex(v ...string) func(*CatSegmentsRequest)

WithIndex - a list of index names to limit the returned information.

func (CatSegments) WithPretty

func (f CatSegments) WithPretty() func(*CatSegmentsRequest)

WithPretty makes the response body pretty-printed.

func (CatSegments) WithS

func (f CatSegments) WithS(v ...string) func(*CatSegmentsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatSegments) WithV

func (f CatSegments) WithV(v bool) func(*CatSegmentsRequest)

WithV - verbose mode. display column headers.

type CatSegmentsRequest

type CatSegmentsRequest struct {
	Index []string

	Bytes  string
	Format string
	H      []string
	Help   *bool
	S      []string
	V      *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatSegmentsRequest configures the Cat Segments API request.

func (CatSegmentsRequest) Do

func (r CatSegmentsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatShards

type CatShards func(o ...func(*CatShardsRequest)) (*Response, error)

CatShards provides a detailed view of shard allocation on nodes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html.

func (CatShards) WithBytes

func (f CatShards) WithBytes(v string) func(*CatShardsRequest)

WithBytes - the unit in which to display byte values.

func (CatShards) WithContext

func (f CatShards) WithContext(v context.Context) func(*CatShardsRequest)

WithContext sets the request context.

func (CatShards) WithErrorTrace

func (f CatShards) WithErrorTrace() func(*CatShardsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatShards) WithFilterPath

func (f CatShards) WithFilterPath(v ...string) func(*CatShardsRequest)

WithFilterPath filters the properties of the response body.

func (CatShards) WithFormat

func (f CatShards) WithFormat(v string) func(*CatShardsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatShards) WithH

func (f CatShards) WithH(v ...string) func(*CatShardsRequest)

WithH - comma-separated list of column names to display.

func (CatShards) WithHelp

func (f CatShards) WithHelp(v bool) func(*CatShardsRequest)

WithHelp - return help information.

func (CatShards) WithHuman

func (f CatShards) WithHuman() func(*CatShardsRequest)

WithHuman makes statistical values human-readable.

func (CatShards) WithIndex

func (f CatShards) WithIndex(v ...string) func(*CatShardsRequest)

WithIndex - a list of index names to limit the returned information.

func (CatShards) WithLocal

func (f CatShards) WithLocal(v bool) func(*CatShardsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatShards) WithMasterTimeout

func (f CatShards) WithMasterTimeout(v time.Duration) func(*CatShardsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatShards) WithPretty

func (f CatShards) WithPretty() func(*CatShardsRequest)

WithPretty makes the response body pretty-printed.

func (CatShards) WithS

func (f CatShards) WithS(v ...string) func(*CatShardsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatShards) WithV

func (f CatShards) WithV(v bool) func(*CatShardsRequest)

WithV - verbose mode. display column headers.

type CatShardsRequest

type CatShardsRequest struct {
	Index []string

	Bytes         string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatShardsRequest configures the Cat Shards API request.

func (CatShardsRequest) Do

func (r CatShardsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatSnapshots

type CatSnapshots func(o ...func(*CatSnapshotsRequest)) (*Response, error)

CatSnapshots returns all snapshots in a specific repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html.

func (CatSnapshots) WithContext

func (f CatSnapshots) WithContext(v context.Context) func(*CatSnapshotsRequest)

WithContext sets the request context.

func (CatSnapshots) WithErrorTrace

func (f CatSnapshots) WithErrorTrace() func(*CatSnapshotsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatSnapshots) WithFilterPath

func (f CatSnapshots) WithFilterPath(v ...string) func(*CatSnapshotsRequest)

WithFilterPath filters the properties of the response body.

func (CatSnapshots) WithFormat

func (f CatSnapshots) WithFormat(v string) func(*CatSnapshotsRequest)