Documentation ¶
Overview ¶
Returns an index template.
Index ¶
- Variables
- type GetIndexTemplate
- func (r GetIndexTemplate) Do(ctx context.Context) (*Response, error)
- func (r *GetIndexTemplate) FlatSettings(b bool) *GetIndexTemplate
- func (r *GetIndexTemplate) Header(key, value string) *GetIndexTemplate
- func (r *GetIndexTemplate) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetIndexTemplate) IncludeDefaults(b bool) *GetIndexTemplate
- func (r GetIndexTemplate) IsSuccess(ctx context.Context) (bool, error)
- func (r *GetIndexTemplate) Local(b bool) *GetIndexTemplate
- func (r *GetIndexTemplate) MasterTimeout(v string) *GetIndexTemplate
- func (r *GetIndexTemplate) Name(v string) *GetIndexTemplate
- func (r GetIndexTemplate) Perform(ctx context.Context) (*http.Response, error)
- type NewGetIndexTemplate
- 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 GetIndexTemplate ¶
type GetIndexTemplate struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetIndexTemplate
Returns an index template.
https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
func (GetIndexTemplate) Do ¶
func (r GetIndexTemplate) Do(ctx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a getindextemplate.Response
func (*GetIndexTemplate) FlatSettings ¶
func (r *GetIndexTemplate) FlatSettings(b bool) *GetIndexTemplate
FlatSettings If true, returns settings in flat format. API name: flat_settings
func (*GetIndexTemplate) Header ¶
func (r *GetIndexTemplate) Header(key, value string) *GetIndexTemplate
Header set a key, value pair in the GetIndexTemplate headers map.
func (*GetIndexTemplate) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetIndexTemplate) IncludeDefaults ¶ added in v8.8.0
func (r *GetIndexTemplate) IncludeDefaults(b bool) *GetIndexTemplate
IncludeDefaults If true, returns all relevant default configurations for the index template. API name: include_defaults
func (GetIndexTemplate) IsSuccess ¶
func (r GetIndexTemplate) 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 (*GetIndexTemplate) Local ¶
func (r *GetIndexTemplate) Local(b bool) *GetIndexTemplate
Local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. API name: local
func (*GetIndexTemplate) MasterTimeout ¶
func (r *GetIndexTemplate) MasterTimeout(v string) *GetIndexTemplate
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 (*GetIndexTemplate) Name ¶
func (r *GetIndexTemplate) Name(v string) *GetIndexTemplate
Name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. API Name: name
type NewGetIndexTemplate ¶
type NewGetIndexTemplate func() *GetIndexTemplate
NewGetIndexTemplate type alias for index.
func NewGetIndexTemplateFunc ¶
func NewGetIndexTemplateFunc(tp elastictransport.Interface) NewGetIndexTemplate
NewGetIndexTemplateFunc returns a new instance of GetIndexTemplate 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 {
IndexTemplates []types.IndexTemplateItem `json:"index_templates"`
}