closepointintime

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Close a point in time

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 ClosePointInTime

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

func (ClosePointInTime) Do

func (r ClosePointInTime) Do(providedCtx context.Context) (*Response, error)

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

func (*ClosePointInTime) Header

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

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

func (*ClosePointInTime) HttpRequest

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

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

func (*ClosePointInTime) Id added in v8.9.0

Id The ID of the point-in-time. API name: id

func (ClosePointInTime) Perform added in v8.7.0

func (r ClosePointInTime) Perform(providedCtx context.Context) (*http.Response, error)

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

func (*ClosePointInTime) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*ClosePointInTime) Request

func (r *ClosePointInTime) Request(req *Request) *ClosePointInTime

Request allows to set the request property with the appropriate payload.

type NewClosePointInTime

type NewClosePointInTime func() *ClosePointInTime

NewClosePointInTime type alias for index.

func NewClosePointInTimeFunc

func NewClosePointInTimeFunc(tp elastictransport.Interface) NewClosePointInTime

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

type Request

type Request struct {

	// Id The ID of the point-in-time.
	Id string `json:"id"`
}

Request holds the request body struct for the package closepointintime

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L37

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

type Response added in v8.7.0

type Response struct {
	NumFreed  int  `json:"num_freed"`
	Succeeded bool `json:"succeeded"`
}

Response holds the response body struct for the package closepointintime

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36

func NewResponse added in v8.7.0

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