Documentation ¶
Overview ¶
Instantiates a transform.
Index ¶
- Variables
- type NewPutTransform
- type PutTransform
- func (r *PutTransform) DeferValidation(defervalidation bool) *PutTransform
- func (r *PutTransform) Description(description string) *PutTransform
- func (r *PutTransform) Dest(dest *types.TransformDestination) *PutTransform
- func (r PutTransform) Do(providedCtx context.Context) (*Response, error)
- func (r *PutTransform) Frequency(duration types.Duration) *PutTransform
- func (r *PutTransform) Header(key, value string) *PutTransform
- func (r *PutTransform) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutTransform) Latest(latest *types.Latest) *PutTransform
- func (r *PutTransform) Meta_(metadata types.Metadata) *PutTransform
- func (r PutTransform) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *PutTransform) Pivot(pivot *types.Pivot) *PutTransform
- func (r *PutTransform) Raw(raw io.Reader) *PutTransform
- func (r *PutTransform) Request(req *Request) *PutTransform
- func (r *PutTransform) RetentionPolicy(retentionpolicy *types.RetentionPolicyContainer) *PutTransform
- func (r *PutTransform) Settings(settings *types.Settings) *PutTransform
- func (r *PutTransform) Source(source *types.TransformSource) *PutTransform
- func (r *PutTransform) Sync(sync *types.SyncContainer) *PutTransform
- func (r *PutTransform) Timeout(duration string) *PutTransform
- type Request
- 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 NewPutTransform ¶
type NewPutTransform func(transformid string) *PutTransform
NewPutTransform type alias for index.
func NewPutTransformFunc ¶
func NewPutTransformFunc(tp elastictransport.Interface) NewPutTransform
NewPutTransformFunc returns a new instance of PutTransform with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PutTransform ¶
type PutTransform struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PutTransform
Instantiates a transform.
https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html
func (*PutTransform) DeferValidation ¶
func (r *PutTransform) DeferValidation(defervalidation bool) *PutTransform
DeferValidation When the transform is created, a series of validations occur to ensure its success. For example, there is a check for the existence of the source indices and a check that the destination index is not part of the source index pattern. You can use this parameter to skip the checks, for example when the source index does not exist until after the transform is created. The validations are always run when you start the transform, however, with the exception of privilege checks. API name: defer_validation
func (*PutTransform) Description ¶ added in v8.9.0
func (r *PutTransform) Description(description string) *PutTransform
Description Free text description of the transform. API name: description
func (*PutTransform) Dest ¶ added in v8.9.0
func (r *PutTransform) Dest(dest *types.TransformDestination) *PutTransform
Dest The destination for the transform. API name: dest
func (PutTransform) Do ¶
func (r PutTransform) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a puttransform.Response
func (*PutTransform) Frequency ¶ added in v8.9.0
func (r *PutTransform) Frequency(duration types.Duration) *PutTransform
Frequency The interval between checks for changes in the source indices when the transform is running continuously. Also determines the retry interval in the event of transient failures while the transform is searching or indexing. The minimum value is `1s` and the maximum is `1h`. API name: frequency
func (*PutTransform) Header ¶
func (r *PutTransform) Header(key, value string) *PutTransform
Header set a key, value pair in the PutTransform headers map.
func (*PutTransform) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutTransform) Latest ¶ added in v8.9.0
func (r *PutTransform) Latest(latest *types.Latest) *PutTransform
Latest The latest method transforms the data by finding the latest document for each unique key. API name: latest
func (*PutTransform) Meta_ ¶ added in v8.9.0
func (r *PutTransform) Meta_(metadata types.Metadata) *PutTransform
Meta_ Defines optional transform metadata. API name: _meta
func (PutTransform) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PutTransform) Pivot ¶ added in v8.9.0
func (r *PutTransform) Pivot(pivot *types.Pivot) *PutTransform
Pivot The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields and the aggregation to reduce the data. API name: pivot
func (*PutTransform) Raw ¶
func (r *PutTransform) Raw(raw io.Reader) *PutTransform
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*PutTransform) Request ¶
func (r *PutTransform) Request(req *Request) *PutTransform
Request allows to set the request property with the appropriate payload.
func (*PutTransform) RetentionPolicy ¶ added in v8.9.0
func (r *PutTransform) RetentionPolicy(retentionpolicy *types.RetentionPolicyContainer) *PutTransform
RetentionPolicy Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index. API name: retention_policy
func (*PutTransform) Settings ¶ added in v8.9.0
func (r *PutTransform) Settings(settings *types.Settings) *PutTransform
Settings Defines optional transform settings. API name: settings
func (*PutTransform) Source ¶ added in v8.9.0
func (r *PutTransform) Source(source *types.TransformSource) *PutTransform
Source The source of the data for the transform. API name: source
func (*PutTransform) Sync ¶ added in v8.9.0
func (r *PutTransform) Sync(sync *types.SyncContainer) *PutTransform
Sync Defines the properties transforms require to run continuously. API name: sync
func (*PutTransform) Timeout ¶
func (r *PutTransform) Timeout(duration string) *PutTransform
Timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout
type Request ¶
type Request struct { // Description Free text description of the transform. Description *string `json:"description,omitempty"` // Dest The destination for the transform. Dest types.TransformDestination `json:"dest"` // Frequency The interval between checks for changes in the source indices when the // transform is running continuously. Also // determines the retry interval in the event of transient failures while the // transform is searching or indexing. // The minimum value is `1s` and the maximum is `1h`. Frequency types.Duration `json:"frequency,omitempty"` // Latest The latest method transforms the data by finding the latest document for each // unique key. Latest *types.Latest `json:"latest,omitempty"` // Meta_ Defines optional transform metadata. Meta_ types.Metadata `json:"_meta,omitempty"` // Pivot The pivot method transforms the data by aggregating and grouping it. These // objects define the group by fields // and the aggregation to reduce the data. Pivot *types.Pivot `json:"pivot,omitempty"` // RetentionPolicy Defines a retention policy for the transform. Data that meets the defined // criteria is deleted from the // destination index. RetentionPolicy *types.RetentionPolicyContainer `json:"retention_policy,omitempty"` // Settings Defines optional transform settings. Settings *types.Settings `json:"settings,omitempty"` // Source The source of the data for the transform. Source types.TransformSource `json:"source"` // Sync Defines the properties transforms require to run continuously. Sync *types.SyncContainer `json:"sync,omitempty"` }
Request holds the request body struct for the package puttransform
func (*Request) FromJSON ¶ added in v8.5.0
FromJSON allows to load an arbitrary json into the request structure