gettransform

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Retrieves configuration information for transforms.

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 GetTransform

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

func (*GetTransform) AllowNoMatch

func (r *GetTransform) AllowNoMatch(b bool) *GetTransform

AllowNoMatch Specifies what to do when the request:

1. Contains wildcard expressions and there are no transforms that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches.

If this parameter is false, the request returns a 404 status code when there are no matches or only partial matches. API name: allow_no_match

func (GetTransform) Do

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

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

func (*GetTransform) ExcludeGenerated

func (r *GetTransform) ExcludeGenerated(b bool) *GetTransform

ExcludeGenerated Excludes fields that were automatically added when creating the transform. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster. API name: exclude_generated

func (*GetTransform) From

func (r *GetTransform) From(i int) *GetTransform

From Skips the specified number of transforms. API name: from

func (*GetTransform) Header

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

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

func (*GetTransform) HttpRequest

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

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

func (GetTransform) IsSuccess

func (r GetTransform) 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 (GetTransform) Perform

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

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

func (*GetTransform) Size

func (r *GetTransform) Size(i int) *GetTransform

Size Specifies the maximum number of transforms to obtain. API name: size

func (*GetTransform) TransformId

func (r *GetTransform) TransformId(v string) *GetTransform

TransformId Identifier for the transform. It can be a transform identifier or a wildcard expression. You can get information for all transforms by using `_all`, by specifying `*` as the `<transform_id>`, or by omitting the `<transform_id>`. API Name: transformid

type NewGetTransform

type NewGetTransform func() *GetTransform

NewGetTransform type alias for index.

func NewGetTransformFunc

func NewGetTransformFunc(tp elastictransport.Interface) NewGetTransform

NewGetTransformFunc returns a new instance of GetTransform with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Response

type Response struct {
	Count      int64                    `json:"count"`
	Transforms []types.TransformSummary `json:"transforms"`
}

func NewResponse

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