Documentation ¶
Overview ¶
Returns information about existing templates.
Index ¶
- Variables
- type NewTemplates
- type Response
- type Templates
- func (r Templates) Do(ctx context.Context) (Response, error)
- func (r *Templates) Header(key, value string) *Templates
- func (r *Templates) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r Templates) IsSuccess(ctx context.Context) (bool, error)
- func (r *Templates) Name(v string) *Templates
- func (r Templates) Perform(ctx context.Context) (*http.Response, error)
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 NewTemplates ¶
type NewTemplates func() *Templates
NewTemplates type alias for index.
func NewTemplatesFunc ¶
func NewTemplatesFunc(tp elastictransport.Interface) NewTemplates
NewTemplatesFunc returns a new instance of Templates 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.TemplatesRecord
type Templates ¶
type Templates struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Templates
Returns information about existing templates.
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cat-templates.html
func (Templates) Do ¶
Do runs the request through the transport, handle the response and returns a templates.Response
func (*Templates) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (Templates) IsSuccess ¶
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.