Documentation
¶
Overview ¶
Validates an anomaly detection job.
Index ¶
- Variables
- type NewValidate
- type Request
- type Response
- type Validate
- func (r Validate) Do(ctx context.Context) (*Response, error)
- func (r *Validate) Header(key, value string) *Validate
- func (r *Validate) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r Validate) Perform(ctx context.Context) (*http.Response, error)
- func (r *Validate) Raw(raw io.Reader) *Validate
- func (r *Validate) Request(req *Request) *Validate
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 NewValidate ¶
type NewValidate func() *Validate
NewValidate type alias for index.
func NewValidateFunc ¶
func NewValidateFunc(tp elastictransport.Interface) NewValidate
NewValidateFunc returns a new instance of Validate 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 {
AnalysisConfig *types.AnalysisConfig `json:"analysis_config,omitempty"`
AnalysisLimits *types.AnalysisLimits `json:"analysis_limits,omitempty"`
DataDescription *types.DataDescription `json:"data_description,omitempty"`
Description *string `json:"description,omitempty"`
JobId *string `json:"job_id,omitempty"`
ModelPlot *types.ModelPlotConfig `json:"model_plot,omitempty"`
ModelSnapshotId *string `json:"model_snapshot_id,omitempty"`
ModelSnapshotRetentionDays *int64 `json:"model_snapshot_retention_days,omitempty"`
ResultsIndexName *string `json:"results_index_name,omitempty"`
}
Request holds the request body struct for the package validate
type Response ¶
type Response struct {
// Acknowledged For a successful response, this value is always true. On failure, an
// exception is returned instead.
Acknowledged bool `json:"acknowledged"`
}
type Validate ¶
type Validate struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Validate
Validates an anomaly detection job.
https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
func (Validate) Do ¶
Do runs the request through the transport, handle the response and returns a validate.Response
func (*Validate) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (Validate) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.