Documentation ¶
Overview ¶
Get model snapshots info.
Index ¶
- Variables
- type GetModelSnapshots
- func (r *GetModelSnapshots) Desc(desc bool) *GetModelSnapshots
- func (r GetModelSnapshots) Do(providedCtx context.Context) (*Response, error)
- func (r *GetModelSnapshots) End(datetime types.DateTime) *GetModelSnapshots
- func (r *GetModelSnapshots) ErrorTrace(errortrace bool) *GetModelSnapshots
- func (r *GetModelSnapshots) FilterPath(filterpaths ...string) *GetModelSnapshots
- func (r *GetModelSnapshots) From(from int) *GetModelSnapshots
- func (r *GetModelSnapshots) Header(key, value string) *GetModelSnapshots
- func (r *GetModelSnapshots) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetModelSnapshots) Human(human bool) *GetModelSnapshots
- func (r *GetModelSnapshots) Page(page *types.Page) *GetModelSnapshots
- func (r GetModelSnapshots) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetModelSnapshots) Pretty(pretty bool) *GetModelSnapshots
- func (r *GetModelSnapshots) Raw(raw io.Reader) *GetModelSnapshots
- func (r *GetModelSnapshots) Request(req *Request) *GetModelSnapshots
- func (r *GetModelSnapshots) Size(size int) *GetModelSnapshots
- func (r *GetModelSnapshots) SnapshotId(snapshotid string) *GetModelSnapshots
- func (r *GetModelSnapshots) Sort(field string) *GetModelSnapshots
- func (r *GetModelSnapshots) Start(datetime types.DateTime) *GetModelSnapshots
- type NewGetModelSnapshots
- 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 GetModelSnapshots ¶
type GetModelSnapshots struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetModelSnapshots
Get model snapshots info.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
func (*GetModelSnapshots) Desc ¶
func (r *GetModelSnapshots) Desc(desc bool) *GetModelSnapshots
Desc Refer to the description for the `desc` query parameter. API name: desc
func (GetModelSnapshots) Do ¶
func (r GetModelSnapshots) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a getmodelsnapshots.Response
func (*GetModelSnapshots) End ¶
func (r *GetModelSnapshots) End(datetime types.DateTime) *GetModelSnapshots
End Refer to the description for the `end` query parameter. API name: end
func (*GetModelSnapshots) ErrorTrace ¶ added in v8.14.0
func (r *GetModelSnapshots) ErrorTrace(errortrace bool) *GetModelSnapshots
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*GetModelSnapshots) FilterPath ¶ added in v8.14.0
func (r *GetModelSnapshots) FilterPath(filterpaths ...string) *GetModelSnapshots
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*GetModelSnapshots) From ¶
func (r *GetModelSnapshots) From(from int) *GetModelSnapshots
From Skips the specified number of snapshots. API name: from
func (*GetModelSnapshots) Header ¶
func (r *GetModelSnapshots) Header(key, value string) *GetModelSnapshots
Header set a key, value pair in the GetModelSnapshots headers map.
func (*GetModelSnapshots) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetModelSnapshots) Human ¶ added in v8.14.0
func (r *GetModelSnapshots) Human(human bool) *GetModelSnapshots
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 (*GetModelSnapshots) Page ¶ added in v8.9.0
func (r *GetModelSnapshots) Page(page *types.Page) *GetModelSnapshots
API name: page
func (GetModelSnapshots) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*GetModelSnapshots) Pretty ¶ added in v8.14.0
func (r *GetModelSnapshots) Pretty(pretty bool) *GetModelSnapshots
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*GetModelSnapshots) Raw ¶
func (r *GetModelSnapshots) Raw(raw io.Reader) *GetModelSnapshots
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*GetModelSnapshots) Request ¶
func (r *GetModelSnapshots) Request(req *Request) *GetModelSnapshots
Request allows to set the request property with the appropriate payload.
func (*GetModelSnapshots) Size ¶
func (r *GetModelSnapshots) Size(size int) *GetModelSnapshots
Size Specifies the maximum number of snapshots to obtain. API name: size
func (*GetModelSnapshots) SnapshotId ¶
func (r *GetModelSnapshots) SnapshotId(snapshotid string) *GetModelSnapshots
SnapshotId A numerical character string that uniquely identifies the model snapshot. You can get information for multiple snapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`, by specifying `*` as the snapshot ID, or by omitting the snapshot ID. API Name: snapshotid
func (*GetModelSnapshots) Sort ¶
func (r *GetModelSnapshots) Sort(field string) *GetModelSnapshots
Sort Refer to the description for the `sort` query parameter. API name: sort
func (*GetModelSnapshots) Start ¶
func (r *GetModelSnapshots) Start(datetime types.DateTime) *GetModelSnapshots
Start Refer to the description for the `start` query parameter. API name: start
type NewGetModelSnapshots ¶
type NewGetModelSnapshots func(jobid string) *GetModelSnapshots
NewGetModelSnapshots type alias for index.
func NewGetModelSnapshotsFunc ¶
func NewGetModelSnapshotsFunc(tp elastictransport.Interface) NewGetModelSnapshots
NewGetModelSnapshotsFunc returns a new instance of GetModelSnapshots 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 { // Desc Refer to the description for the `desc` query parameter. Desc *bool `json:"desc,omitempty"` // End Refer to the description for the `end` query parameter. End types.DateTime `json:"end,omitempty"` Page *types.Page `json:"page,omitempty"` // Sort Refer to the description for the `sort` query parameter. Sort *string `json:"sort,omitempty"` // Start Refer to the description for the `start` query parameter. Start types.DateTime `json:"start,omitempty"` }
Request holds the request body struct for the package getmodelsnapshots
func (*Request) FromJSON ¶ added in v8.5.0
FromJSON allows to load an arbitrary json into the request structure
func (*Request) UnmarshalJSON ¶ added in v8.12.1
type Response ¶ added in v8.7.0
type Response struct { Count int64 `json:"count"` ModelSnapshots []types.ModelSnapshot `json:"model_snapshots"` }
Response holds the response body struct for the package getmodelsnapshots