getmapping

package
v8.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Returns mappings for one or more indices.

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 GetMapping

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

func (*GetMapping) AllowNoIndices

func (r *GetMapping) AllowNoIndices(b bool) *GetMapping

AllowNoIndices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) API name: allow_no_indices

func (GetMapping) Do

func (r GetMapping) Do(ctx context.Context) (Response, error)

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

func (*GetMapping) ExpandWildcards

func (r *GetMapping) ExpandWildcards(v string) *GetMapping

ExpandWildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. API name: expand_wildcards

func (*GetMapping) Header

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

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

func (*GetMapping) HttpRequest

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

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

func (*GetMapping) IgnoreUnavailable

func (r *GetMapping) IgnoreUnavailable(b bool) *GetMapping

IgnoreUnavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) API name: ignore_unavailable

func (*GetMapping) Index

func (r *GetMapping) Index(v string) *GetMapping

Index A comma-separated list of index names API Name: index

func (GetMapping) IsSuccess

func (r GetMapping) IsSuccess(ctx context.Context) (bool, error)

IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.

func (*GetMapping) Local

func (r *GetMapping) Local(b bool) *GetMapping

Local Return local information, do not retrieve the state from master node (default: false) API name: local

func (*GetMapping) MasterTimeout

func (r *GetMapping) MasterTimeout(v string) *GetMapping

MasterTimeout Specify timeout for connection to master API name: master_timeout

func (GetMapping) Perform added in v8.7.0

func (r GetMapping) Perform(ctx context.Context) (*http.Response, error)

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

type NewGetMapping

type NewGetMapping func() *GetMapping

NewGetMapping type alias for index.

func NewGetMappingFunc

func NewGetMappingFunc(tp elastictransport.Interface) NewGetMapping

NewGetMappingFunc returns a new instance of GetMapping 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 map[string]types.IndexMappingRecord

func NewResponse added in v8.7.0

func NewResponse() Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

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