Documentation ¶
Overview ¶
Returns mappings for one or more indices.
Index ¶
- Variables
- type GetMapping
- func (r *GetMapping) AllowNoIndices(b bool) *GetMapping
- func (r GetMapping) Do(ctx context.Context) (Response, error)
- func (r *GetMapping) ExpandWildcards(v string) *GetMapping
- func (r *GetMapping) Header(key, value string) *GetMapping
- func (r *GetMapping) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetMapping) IgnoreUnavailable(b bool) *GetMapping
- func (r *GetMapping) Index(v string) *GetMapping
- func (r GetMapping) IsSuccess(ctx context.Context) (bool, error)
- func (r *GetMapping) Local(b bool) *GetMapping
- func (r *GetMapping) MasterTimeout(v string) *GetMapping
- func (r GetMapping) Perform(ctx context.Context) (*http.Response, error)
- type NewGetMapping
- type Response
Constants ¶
This section is empty.
Variables ¶
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 New ¶
func New(tp elastictransport.Interface) *GetMapping
Returns mappings for one or more indices.
https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
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 ¶
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
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