Documentation ¶
Overview ¶
Close a point in time
Index ¶
- Variables
- type ClosePointInTime
- func (r ClosePointInTime) Do(providedCtx context.Context) (*Response, error)
- func (r *ClosePointInTime) Header(key, value string) *ClosePointInTime
- func (r *ClosePointInTime) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *ClosePointInTime) Id(id string) *ClosePointInTime
- func (r ClosePointInTime) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *ClosePointInTime) Raw(raw io.Reader) *ClosePointInTime
- func (r *ClosePointInTime) Request(req *Request) *ClosePointInTime
- type NewClosePointInTime
- 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 ClosePointInTime ¶
type ClosePointInTime struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ClosePointInTime
Close a point in time
https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*ClosePointInTime) Id ¶ added in v8.9.0
func (r *ClosePointInTime) Id(id string) *ClosePointInTime
Id The ID of the point-in-time. API name: id
func (ClosePointInTime) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*ClosePointInTime) Raw ¶
func (r *ClosePointInTime) Raw(raw io.Reader) *ClosePointInTime
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