Documentation ¶
Overview ¶
Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported
Index ¶
- Variables
- type Capabilities
- func (r Capabilities) Do(ctx context.Context) (bool, error)
- func (r *Capabilities) Header(key, value string) *Capabilities
- func (r *Capabilities) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r Capabilities) IsSuccess(providedCtx context.Context) (bool, error)
- func (r Capabilities) Perform(providedCtx context.Context) (*http.Response, error)
- type NewCapabilities
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 Capabilities ¶
type Capabilities struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Capabilities
Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported
func (Capabilities) Do ¶
func (r Capabilities) Do(ctx context.Context) (bool, error)
Do runs the request through the transport, handle the response and returns a capabilities.Response
func (*Capabilities) Header ¶
func (r *Capabilities) Header(key, value string) *Capabilities
Header set a key, value pair in the Capabilities headers map.
func (*Capabilities) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
type NewCapabilities ¶
type NewCapabilities func() *Capabilities
NewCapabilities type alias for index.
func NewCapabilitiesFunc ¶
func NewCapabilitiesFunc(tp elastictransport.Interface) NewCapabilities
NewCapabilitiesFunc returns a new instance of Capabilities with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.