Documentation ¶
Overview ¶
Returns information about existing component_templates templates.
Index ¶
- Variables
- type ComponentTemplates
- func (r ComponentTemplates) Do(providedCtx context.Context) (Response, error)
- func (r *ComponentTemplates) Header(key, value string) *ComponentTemplates
- func (r *ComponentTemplates) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r ComponentTemplates) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *ComponentTemplates) Name(name string) *ComponentTemplates
- func (r ComponentTemplates) Perform(providedCtx context.Context) (*http.Response, error)
- type NewComponentTemplates
- 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 ComponentTemplates ¶
type ComponentTemplates struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ComponentTemplates
Returns information about existing component_templates templates.
https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html
func (ComponentTemplates) Do ¶
func (r ComponentTemplates) Do(providedCtx context.Context) (Response, error)
Do runs the request through the transport, handle the response and returns a componenttemplates.Response
func (*ComponentTemplates) Header ¶
func (r *ComponentTemplates) Header(key, value string) *ComponentTemplates
Header set a key, value pair in the ComponentTemplates headers map.
func (*ComponentTemplates) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (ComponentTemplates) IsSuccess ¶
func (r ComponentTemplates) IsSuccess(providedCtx 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 (*ComponentTemplates) Name ¶
func (r *ComponentTemplates) Name(name string) *ComponentTemplates
Name The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned. API Name: name
type NewComponentTemplates ¶
type NewComponentTemplates func() *ComponentTemplates
NewComponentTemplates type alias for index.
func NewComponentTemplatesFunc ¶
func NewComponentTemplatesFunc(tp elastictransport.Interface) NewComponentTemplates
NewComponentTemplatesFunc returns a new instance of ComponentTemplates with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Response ¶
type Response []types.CatComponentTemplate