Documentation ¶
Overview ¶
Returns all script contexts.
Index ¶
- Variables
- type GetScriptContext
- func (r GetScriptContext) Do(providedCtx context.Context) (*Response, error)
- func (r *GetScriptContext) Header(key, value string) *GetScriptContext
- func (r *GetScriptContext) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r GetScriptContext) IsSuccess(providedCtx context.Context) (bool, error)
- func (r GetScriptContext) Perform(providedCtx context.Context) (*http.Response, error)
- type NewGetScriptContext
- 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 GetScriptContext ¶
type GetScriptContext struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetScriptContext
Returns all script contexts.
https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html
func (GetScriptContext) Do ¶
func (r GetScriptContext) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a getscriptcontext.Response
func (*GetScriptContext) Header ¶
func (r *GetScriptContext) Header(key, value string) *GetScriptContext
Header set a key, value pair in the GetScriptContext headers map.
func (*GetScriptContext) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
type NewGetScriptContext ¶
type NewGetScriptContext func() *GetScriptContext
NewGetScriptContext type alias for index.
func NewGetScriptContextFunc ¶
func NewGetScriptContextFunc(tp elastictransport.Interface) NewGetScriptContext
NewGetScriptContextFunc returns a new instance of GetScriptContext 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 {
Contexts []types.GetScriptContext `json:"contexts"`
}
Response holds the response body struct for the package getscriptcontext