Documentation ¶
Overview ¶
Instantiates a filter.
Index ¶
- Variables
- type NewPutFilter
- type PutFilter
- func (r *PutFilter) Description(description string) *PutFilter
- func (r PutFilter) Do(providedCtx context.Context) (*Response, error)
- func (r *PutFilter) Header(key, value string) *PutFilter
- func (r *PutFilter) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutFilter) Items(items ...string) *PutFilter
- func (r PutFilter) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *PutFilter) Raw(raw io.Reader) *PutFilter
- func (r *PutFilter) Request(req *Request) *PutFilter
- 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 NewPutFilter ¶
NewPutFilter type alias for index.
func NewPutFilterFunc ¶
func NewPutFilterFunc(tp elastictransport.Interface) NewPutFilter
NewPutFilterFunc returns a new instance of PutFilter with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PutFilter ¶
type PutFilter struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PutFilter
Instantiates a filter.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html
func (*PutFilter) Description ¶ added in v8.9.0
Description A description of the filter. API name: description
func (PutFilter) Do ¶
Do runs the request through the transport, handle the response and returns a putfilter.Response
func (*PutFilter) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutFilter) Items ¶ added in v8.9.0
Items The items of the filter. A wildcard `*` can be used at the beginning or the end of an item. Up to 10000 items are allowed in each filter. API name: items
func (PutFilter) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
type Request ¶
type Request struct { // Description A description of the filter. Description *string `json:"description,omitempty"` // Items The items of the filter. A wildcard `*` can be used at the beginning or the // end of an item. // Up to 10000 items are allowed in each filter. Items []string `json:"items,omitempty"` }
Request holds the request body struct for the package putfilter