getinfluencers

package
v8.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Retrieves anomaly detection job results for one or more influencers.

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 GetInfluencers

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

func New

Retrieves anomaly detection job results for one or more influencers.

https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html

func (*GetInfluencers) Desc

func (r *GetInfluencers) Desc(b bool) *GetInfluencers

Desc If true, the results are sorted in descending order. API name: desc

func (GetInfluencers) Do

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

func (*GetInfluencers) End

End Returns influencers with timestamps earlier than this time. The default value means it is unset and results are not limited to specific timestamps. API name: end

func (*GetInfluencers) ExcludeInterim

func (r *GetInfluencers) ExcludeInterim(b bool) *GetInfluencers

ExcludeInterim If true, the output excludes interim results. By default, interim results are included. API name: exclude_interim

func (*GetInfluencers) From

func (r *GetInfluencers) From(i int) *GetInfluencers

From Skips the specified number of influencers. API name: from

func (*GetInfluencers) Header

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

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

func (*GetInfluencers) HttpRequest

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

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

func (*GetInfluencers) InfluencerScore

func (r *GetInfluencers) InfluencerScore(v string) *GetInfluencers

InfluencerScore Returns influencers with anomaly scores greater than or equal to this value. API name: influencer_score

func (*GetInfluencers) JobId

func (r *GetInfluencers) JobId(v string) *GetInfluencers

JobId Identifier for the anomaly detection job. API Name: jobid

func (GetInfluencers) Perform added in v8.7.0

func (r GetInfluencers) Perform(ctx context.Context) (*http.Response, error)

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

func (*GetInfluencers) Raw

func (r *GetInfluencers) Raw(raw io.Reader) *GetInfluencers

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

func (*GetInfluencers) Request

func (r *GetInfluencers) Request(req *Request) *GetInfluencers

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

func (*GetInfluencers) Size

func (r *GetInfluencers) Size(i int) *GetInfluencers

Size Specifies the maximum number of influencers to obtain. API name: size

func (*GetInfluencers) Sort

func (r *GetInfluencers) Sort(v string) *GetInfluencers

Sort Specifies the sort field for the requested influencers. By default, the influencers are sorted by the `influencer_score` value. API name: sort

func (*GetInfluencers) Start

func (r *GetInfluencers) Start(v string) *GetInfluencers

Start Returns influencers with timestamps after this time. The default value means it is unset and results are not limited to specific timestamps. API name: start

type NewGetInfluencers

type NewGetInfluencers func(jobid string) *GetInfluencers

NewGetInfluencers type alias for index.

func NewGetInfluencersFunc

func NewGetInfluencersFunc(tp elastictransport.Interface) NewGetInfluencers

NewGetInfluencersFunc returns a new instance of GetInfluencers 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 {
	Page *types.Page `json:"page,omitempty"`
}

Request holds the request body struct for the package getinfluencers

https://github.com/elastic/elasticsearch-specification/blob/a0da620389f06553c0727f98f95e40dbb564fcca/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L93

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 {
	Count int64 `json:"count"`
	// Influencers Array of influencer objects
	Influencers []types.Influencer `json:"influencers"`
}

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