simulatetemplate

package
v8.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Simulate resolving the given template name or body

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type NewSimulateTemplate

type NewSimulateTemplate func() *SimulateTemplate

NewSimulateTemplate type alias for index.

func NewSimulateTemplateFunc

func NewSimulateTemplateFunc(tp elastictransport.Interface) NewSimulateTemplate

NewSimulateTemplateFunc returns a new instance of SimulateTemplate with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Response added in v8.7.0

type Response struct {
	Overlapping []types.Overlapping `json:"overlapping,omitempty"`
	Template    types.Template      `json:"template"`
}

Response holds the response body struct for the package simulatetemplate

https://github.com/elastic/elasticsearch-specification/blob/b2c13a00c152a97cb41193deda8ed9b37fd06796/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

type SimulateTemplate

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

func (*SimulateTemplate) AllowAutoCreate added in v8.11.0

func (r *SimulateTemplate) AllowAutoCreate(allowautocreate bool) *SimulateTemplate

API name: allow_auto_create

func (*SimulateTemplate) ComposedOf added in v8.11.0

func (r *SimulateTemplate) ComposedOf(composedofs ...string) *SimulateTemplate

ComposedOf An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. API name: composed_of

func (*SimulateTemplate) Create

func (r *SimulateTemplate) Create(create bool) *SimulateTemplate

Create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. API name: create

func (*SimulateTemplate) DataStream added in v8.11.0

DataStream If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with a `data_stream` object. API name: data_stream

func (SimulateTemplate) Do

func (r SimulateTemplate) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a simulatetemplate.Response

func (*SimulateTemplate) Header

func (r *SimulateTemplate) Header(key, value string) *SimulateTemplate

Header set a key, value pair in the SimulateTemplate headers map.

func (*SimulateTemplate) HttpRequest

func (r *SimulateTemplate) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*SimulateTemplate) IncludeDefaults added in v8.8.0

func (r *SimulateTemplate) IncludeDefaults(includedefaults bool) *SimulateTemplate

IncludeDefaults If true, returns all relevant default configurations for the index template. API name: include_defaults

func (*SimulateTemplate) IndexPatterns added in v8.11.0

func (r *SimulateTemplate) IndexPatterns(names ...string) *SimulateTemplate

IndexPatterns Name of the index template. API name: index_patterns

func (*SimulateTemplate) MasterTimeout

func (r *SimulateTemplate) MasterTimeout(duration string) *SimulateTemplate

MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout

func (*SimulateTemplate) Meta_ added in v8.11.0

func (r *SimulateTemplate) Meta_(metadata types.Metadata) *SimulateTemplate

Meta_ Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch. API name: _meta

func (*SimulateTemplate) Name

func (r *SimulateTemplate) Name(name string) *SimulateTemplate

Name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body. API Name: name

func (SimulateTemplate) Perform added in v8.7.0

func (r SimulateTemplate) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*SimulateTemplate) Priority added in v8.11.0

func (r *SimulateTemplate) Priority(priority int64) *SimulateTemplate

Priority Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch. API name: priority

func (*SimulateTemplate) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*SimulateTemplate) Request

func (r *SimulateTemplate) Request(req *Request) *SimulateTemplate

Request allows to set the request property with the appropriate payload.

func (*SimulateTemplate) Template added in v8.11.0

Template Template to be applied. It may optionally include an `aliases`, `mappings`, or `settings` configuration. API name: template

func (*SimulateTemplate) Version added in v8.11.0

func (r *SimulateTemplate) Version(versionnumber int64) *SimulateTemplate

Version Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch. API name: version

Jump to

Keyboard shortcuts

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