Documentation ¶
Overview ¶
Get anomaly detection job results for buckets. The API presents a chronological view of the records, grouped by bucket.
Index ¶
- Variables
- type GetBuckets
- func (r *GetBuckets) AnomalyScore(anomalyscore types.Float64) *GetBuckets
- func (r *GetBuckets) Desc(desc bool) *GetBuckets
- func (r GetBuckets) Do(providedCtx context.Context) (*Response, error)
- func (r *GetBuckets) End(datetime types.DateTime) *GetBuckets
- func (r *GetBuckets) ErrorTrace(errortrace bool) *GetBuckets
- func (r *GetBuckets) ExcludeInterim(excludeinterim bool) *GetBuckets
- func (r *GetBuckets) Expand(expand bool) *GetBuckets
- func (r *GetBuckets) FilterPath(filterpaths ...string) *GetBuckets
- func (r *GetBuckets) From(from int) *GetBuckets
- func (r *GetBuckets) Header(key, value string) *GetBuckets
- func (r *GetBuckets) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetBuckets) Human(human bool) *GetBuckets
- func (r *GetBuckets) Page(page *types.Page) *GetBuckets
- func (r GetBuckets) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetBuckets) Pretty(pretty bool) *GetBuckets
- func (r *GetBuckets) Raw(raw io.Reader) *GetBuckets
- func (r *GetBuckets) Request(req *Request) *GetBuckets
- func (r *GetBuckets) Size(size int) *GetBuckets
- func (r *GetBuckets) Sort(field string) *GetBuckets
- func (r *GetBuckets) Start(datetime types.DateTime) *GetBuckets
- func (r *GetBuckets) Timestamp(timestamp string) *GetBuckets
- type NewGetBuckets
- 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 GetBuckets ¶
type GetBuckets struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetBuckets
Get anomaly detection job results for buckets. The API presents a chronological view of the records, grouped by bucket.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html
func (*GetBuckets) AnomalyScore ¶
func (r *GetBuckets) AnomalyScore(anomalyscore types.Float64) *GetBuckets
AnomalyScore Refer to the description for the `anomaly_score` query parameter. API name: anomaly_score
func (*GetBuckets) Desc ¶
func (r *GetBuckets) Desc(desc bool) *GetBuckets
Desc Refer to the description for the `desc` query parameter. API name: desc
func (GetBuckets) Do ¶
func (r GetBuckets) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a getbuckets.Response
func (*GetBuckets) End ¶
func (r *GetBuckets) End(datetime types.DateTime) *GetBuckets
End Refer to the description for the `end` query parameter. API name: end
func (*GetBuckets) ErrorTrace ¶ added in v8.14.0
func (r *GetBuckets) ErrorTrace(errortrace bool) *GetBuckets
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*GetBuckets) ExcludeInterim ¶
func (r *GetBuckets) ExcludeInterim(excludeinterim bool) *GetBuckets
ExcludeInterim Refer to the description for the `exclude_interim` query parameter. API name: exclude_interim
func (*GetBuckets) Expand ¶
func (r *GetBuckets) Expand(expand bool) *GetBuckets
Expand Refer to the description for the `expand` query parameter. API name: expand
func (*GetBuckets) FilterPath ¶ added in v8.14.0
func (r *GetBuckets) FilterPath(filterpaths ...string) *GetBuckets
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*GetBuckets) From ¶
func (r *GetBuckets) From(from int) *GetBuckets
From Skips the specified number of buckets. API name: from
func (*GetBuckets) Header ¶
func (r *GetBuckets) Header(key, value string) *GetBuckets
Header set a key, value pair in the GetBuckets headers map.
func (*GetBuckets) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetBuckets) Human ¶ added in v8.14.0
func (r *GetBuckets) Human(human bool) *GetBuckets
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 (*GetBuckets) Page ¶ added in v8.9.0
func (r *GetBuckets) Page(page *types.Page) *GetBuckets
API name: page
func (GetBuckets) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*GetBuckets) Pretty ¶ added in v8.14.0
func (r *GetBuckets) Pretty(pretty bool) *GetBuckets
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*GetBuckets) Raw ¶
func (r *GetBuckets) Raw(raw io.Reader) *GetBuckets
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*GetBuckets) Request ¶
func (r *GetBuckets) Request(req *Request) *GetBuckets
Request allows to set the request property with the appropriate payload.
func (*GetBuckets) Size ¶
func (r *GetBuckets) Size(size int) *GetBuckets
Size Specifies the maximum number of buckets to obtain. API name: size
func (*GetBuckets) Sort ¶
func (r *GetBuckets) Sort(field string) *GetBuckets
Sort Refer to the desription for the `sort` query parameter. API name: sort
func (*GetBuckets) Start ¶
func (r *GetBuckets) Start(datetime types.DateTime) *GetBuckets
Start Refer to the description for the `start` query parameter. API name: start
func (*GetBuckets) Timestamp ¶
func (r *GetBuckets) Timestamp(timestamp string) *GetBuckets
Timestamp The timestamp of a single bucket result. If you do not specify this parameter, the API returns information about all buckets. API Name: timestamp
type NewGetBuckets ¶
type NewGetBuckets func(jobid string) *GetBuckets
NewGetBuckets type alias for index.
func NewGetBucketsFunc ¶
func NewGetBucketsFunc(tp elastictransport.Interface) NewGetBuckets
NewGetBucketsFunc returns a new instance of GetBuckets 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 { // AnomalyScore Refer to the description for the `anomaly_score` query parameter. AnomalyScore *types.Float64 `json:"anomaly_score,omitempty"` // 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"` // ExcludeInterim Refer to the description for the `exclude_interim` query parameter. ExcludeInterim *bool `json:"exclude_interim,omitempty"` // Expand Refer to the description for the `expand` query parameter. Expand *bool `json:"expand,omitempty"` Page *types.Page `json:"page,omitempty"` // Sort Refer to the desription 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 getbuckets
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 { Buckets []types.BucketSummary `json:"buckets"` Count int64 `json:"count"` }
Response holds the response body struct for the package getbuckets