Documentation ¶
Overview ¶
Delete a calendar. Removes all scheduled events from a calendar, then deletes it.
Index ¶
- Variables
- type DeleteCalendar
- func (r DeleteCalendar) Do(providedCtx context.Context) (*Response, error)
- func (r *DeleteCalendar) ErrorTrace(errortrace bool) *DeleteCalendar
- func (r *DeleteCalendar) FilterPath(filterpaths ...string) *DeleteCalendar
- func (r *DeleteCalendar) Header(key, value string) *DeleteCalendar
- func (r *DeleteCalendar) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *DeleteCalendar) Human(human bool) *DeleteCalendar
- func (r DeleteCalendar) IsSuccess(providedCtx context.Context) (bool, error)
- func (r DeleteCalendar) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *DeleteCalendar) Pretty(pretty bool) *DeleteCalendar
- type NewDeleteCalendar
- 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 DeleteCalendar ¶
type DeleteCalendar struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *DeleteCalendar
Delete a calendar. Removes all scheduled events from a calendar, then deletes it.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html
func (DeleteCalendar) Do ¶
func (r DeleteCalendar) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a deletecalendar.Response
func (*DeleteCalendar) ErrorTrace ¶ added in v8.14.0
func (r *DeleteCalendar) ErrorTrace(errortrace bool) *DeleteCalendar
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*DeleteCalendar) FilterPath ¶ added in v8.14.0
func (r *DeleteCalendar) FilterPath(filterpaths ...string) *DeleteCalendar
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*DeleteCalendar) Header ¶
func (r *DeleteCalendar) Header(key, value string) *DeleteCalendar
Header set a key, value pair in the DeleteCalendar headers map.
func (*DeleteCalendar) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*DeleteCalendar) Human ¶ added in v8.14.0
func (r *DeleteCalendar) Human(human bool) *DeleteCalendar
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (DeleteCalendar) IsSuccess ¶
func (r DeleteCalendar) IsSuccess(providedCtx 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 (DeleteCalendar) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*DeleteCalendar) Pretty ¶ added in v8.14.0
func (r *DeleteCalendar) Pretty(pretty bool) *DeleteCalendar
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
type NewDeleteCalendar ¶
type NewDeleteCalendar func(calendarid string) *DeleteCalendar
NewDeleteCalendar type alias for index.
func NewDeleteCalendarFunc ¶
func NewDeleteCalendarFunc(tp elastictransport.Interface) NewDeleteCalendar
NewDeleteCalendarFunc returns a new instance of DeleteCalendar with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.