Documentation ¶
Overview ¶
Get trained model configuration info.
Index ¶
- Variables
- type GetTrainedModels
- func (r *GetTrainedModels) AllowNoMatch(allownomatch bool) *GetTrainedModels
- func (r *GetTrainedModels) DecompressDefinition(decompressdefinition bool) *GetTrainedModels
- func (r GetTrainedModels) Do(providedCtx context.Context) (*Response, error)
- func (r *GetTrainedModels) ErrorTrace(errortrace bool) *GetTrainedModels
- func (r *GetTrainedModels) ExcludeGenerated(excludegenerated bool) *GetTrainedModels
- func (r *GetTrainedModels) FilterPath(filterpaths ...string) *GetTrainedModels
- func (r *GetTrainedModels) From(from int) *GetTrainedModels
- func (r *GetTrainedModels) Header(key, value string) *GetTrainedModels
- func (r *GetTrainedModels) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetTrainedModels) Human(human bool) *GetTrainedModels
- func (r *GetTrainedModels) Include(include include.Include) *GetTrainedModels
- func (r GetTrainedModels) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *GetTrainedModels) ModelId(modelid string) *GetTrainedModels
- func (r GetTrainedModels) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetTrainedModels) Pretty(pretty bool) *GetTrainedModels
- func (r *GetTrainedModels) Size(size int) *GetTrainedModels
- func (r *GetTrainedModels) Tags(tags ...string) *GetTrainedModels
- type NewGetTrainedModels
- 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 GetTrainedModels ¶
type GetTrainedModels struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetTrainedModels
Get trained model configuration info.
https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html
func (*GetTrainedModels) AllowNoMatch ¶
func (r *GetTrainedModels) AllowNoMatch(allownomatch bool) *GetTrainedModels
AllowNoMatch Specifies what to do when the request:
- Contains wildcard expressions and there are no models that match. - Contains the _all string or no identifiers and there are no matches. - Contains wildcard expressions and there are only partial matches.
If true, it returns an empty array when there are no matches and the subset of results when there are partial matches. API name: allow_no_match
func (*GetTrainedModels) DecompressDefinition ¶
func (r *GetTrainedModels) DecompressDefinition(decompressdefinition bool) *GetTrainedModels
DecompressDefinition Specifies whether the included model definition should be returned as a JSON map (true) or in a custom compressed format (false). API name: decompress_definition
func (GetTrainedModels) Do ¶
func (r GetTrainedModels) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a gettrainedmodels.Response
func (*GetTrainedModels) ErrorTrace ¶ added in v8.14.0
func (r *GetTrainedModels) ErrorTrace(errortrace bool) *GetTrainedModels
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*GetTrainedModels) ExcludeGenerated ¶
func (r *GetTrainedModels) ExcludeGenerated(excludegenerated bool) *GetTrainedModels
ExcludeGenerated Indicates if certain fields should be removed from the configuration on retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster. API name: exclude_generated
func (*GetTrainedModels) FilterPath ¶ added in v8.14.0
func (r *GetTrainedModels) FilterPath(filterpaths ...string) *GetTrainedModels
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*GetTrainedModels) From ¶
func (r *GetTrainedModels) From(from int) *GetTrainedModels
From Skips the specified number of models. API name: from
func (*GetTrainedModels) Header ¶
func (r *GetTrainedModels) Header(key, value string) *GetTrainedModels
Header set a key, value pair in the GetTrainedModels headers map.
func (*GetTrainedModels) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetTrainedModels) Human ¶ added in v8.14.0
func (r *GetTrainedModels) Human(human bool) *GetTrainedModels
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 (*GetTrainedModels) Include ¶
func (r *GetTrainedModels) Include(include include.Include) *GetTrainedModels
Include A comma delimited string of optional fields to include in the response body. API name: include
func (GetTrainedModels) IsSuccess ¶
func (r GetTrainedModels) 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 (*GetTrainedModels) ModelId ¶
func (r *GetTrainedModels) ModelId(modelid string) *GetTrainedModels
ModelId The unique identifier of the trained model or a model alias.
You can get information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression. API Name: modelid
func (GetTrainedModels) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*GetTrainedModels) Pretty ¶ added in v8.14.0
func (r *GetTrainedModels) Pretty(pretty bool) *GetTrainedModels
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*GetTrainedModels) Size ¶
func (r *GetTrainedModels) Size(size int) *GetTrainedModels
Size Specifies the maximum number of models to obtain. API name: size
func (*GetTrainedModels) Tags ¶
func (r *GetTrainedModels) Tags(tags ...string) *GetTrainedModels
Tags A comma delimited string of tags. A trained model can have many tags, or none. When supplied, only trained models that contain all the supplied tags are returned. API name: tags
type NewGetTrainedModels ¶
type NewGetTrainedModels func() *GetTrainedModels
NewGetTrainedModels type alias for index.
func NewGetTrainedModelsFunc ¶
func NewGetTrainedModelsFunc(tp elastictransport.Interface) NewGetTrainedModels
NewGetTrainedModelsFunc returns a new instance of GetTrainedModels with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Response ¶ added in v8.7.0
type Response struct { Count int `json:"count"` // TrainedModelConfigs An array of trained model resources, which are sorted by the model_id value // in ascending order. TrainedModelConfigs []types.TrainedModelConfig `json:"trained_model_configs"` }
Response holds the response body struct for the package gettrainedmodels