Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type InvokeInternalServerError
- func (o *InvokeInternalServerError) Code() int
- func (o *InvokeInternalServerError) Error() string
- func (o *InvokeInternalServerError) GetPayload() *models.Payload
- func (o *InvokeInternalServerError) IsClientError() bool
- func (o *InvokeInternalServerError) IsCode(code int) bool
- func (o *InvokeInternalServerError) IsRedirect() bool
- func (o *InvokeInternalServerError) IsServerError() bool
- func (o *InvokeInternalServerError) IsSuccess() bool
- func (o *InvokeInternalServerError) String() string
- type InvokeOK
- func (o *InvokeOK) Code() int
- func (o *InvokeOK) Error() string
- func (o *InvokeOK) GetPayload() *InvokeOKBody
- func (o *InvokeOK) IsClientError() bool
- func (o *InvokeOK) IsCode(code int) bool
- func (o *InvokeOK) IsRedirect() bool
- func (o *InvokeOK) IsServerError() bool
- func (o *InvokeOK) IsSuccess() bool
- func (o *InvokeOK) String() string
- type InvokeOKBody
- type InvokeParams
- func (o *InvokeParams) SetBody(body *models.Object)
- func (o *InvokeParams) SetContext(ctx context.Context)
- func (o *InvokeParams) SetDefaults()
- func (o *InvokeParams) SetHTTPClient(client *http.Client)
- func (o *InvokeParams) SetName(name string)
- func (o *InvokeParams) SetTimeout(timeout time.Duration)
- func (o *InvokeParams) WithBody(body *models.Object) *InvokeParams
- func (o *InvokeParams) WithContext(ctx context.Context) *InvokeParams
- func (o *InvokeParams) WithDefaults() *InvokeParams
- func (o *InvokeParams) WithHTTPClient(client *http.Client) *InvokeParams
- func (o *InvokeParams) WithName(name string) *InvokeParams
- func (o *InvokeParams) WithTimeout(timeout time.Duration) *InvokeParams
- func (o *InvokeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type InvokeReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for invocation API
func (*Client) Invoke ¶
func (a *Client) Invoke(params *InvokeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InvokeOK, error)
Invoke invokes a middleware by name
Expects a coprocess.Object encoded as JSON in the request body and returns the result in the same way.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { Invoke(params *InvokeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InvokeOK, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new invocation API client.
type InvokeInternalServerError ¶
InvokeInternalServerError describes a response with status code 500, with default header values.
Generic error specified by `Status` and `Error` fields
func NewInvokeInternalServerError ¶
func NewInvokeInternalServerError() *InvokeInternalServerError
NewInvokeInternalServerError creates a InvokeInternalServerError with default headers values
func (*InvokeInternalServerError) Code ¶
func (o *InvokeInternalServerError) Code() int
Code gets the status code for the invoke internal server error response
func (*InvokeInternalServerError) Error ¶
func (o *InvokeInternalServerError) Error() string
func (*InvokeInternalServerError) GetPayload ¶
func (o *InvokeInternalServerError) GetPayload() *models.Payload
func (*InvokeInternalServerError) IsClientError ¶
func (o *InvokeInternalServerError) IsClientError() bool
IsClientError returns true when this invoke internal server error response has a 4xx status code
func (*InvokeInternalServerError) IsCode ¶
func (o *InvokeInternalServerError) IsCode(code int) bool
IsCode returns true when this invoke internal server error response a status code equal to that given
func (*InvokeInternalServerError) IsRedirect ¶
func (o *InvokeInternalServerError) IsRedirect() bool
IsRedirect returns true when this invoke internal server error response has a 3xx status code
func (*InvokeInternalServerError) IsServerError ¶
func (o *InvokeInternalServerError) IsServerError() bool
IsServerError returns true when this invoke internal server error response has a 5xx status code
func (*InvokeInternalServerError) IsSuccess ¶
func (o *InvokeInternalServerError) IsSuccess() bool
IsSuccess returns true when this invoke internal server error response has a 2xx status code
func (*InvokeInternalServerError) String ¶
func (o *InvokeInternalServerError) String() string
type InvokeOK ¶
type InvokeOK struct {
Payload *InvokeOKBody
}
InvokeOK describes a response with status code 200, with default header values.
Middleware invocation response
func NewInvokeOK ¶
func NewInvokeOK() *InvokeOK
NewInvokeOK creates a InvokeOK with default headers values
func (*InvokeOK) GetPayload ¶
func (o *InvokeOK) GetPayload() *InvokeOKBody
func (*InvokeOK) IsClientError ¶
IsClientError returns true when this invoke o k response has a 4xx status code
func (*InvokeOK) IsCode ¶
IsCode returns true when this invoke o k response a status code equal to that given
func (*InvokeOK) IsRedirect ¶
IsRedirect returns true when this invoke o k response has a 3xx status code
func (*InvokeOK) IsServerError ¶
IsServerError returns true when this invoke o k response has a 5xx status code
type InvokeOKBody ¶
type InvokeOKBody struct { // error Error string `json:"Error,omitempty"` // payload Payload *models.Object `json:"Payload,omitempty"` // status Status string `json:"Status,omitempty"` }
InvokeOKBody invoke o k body swagger:model InvokeOKBody
func (*InvokeOKBody) ContextValidate ¶
ContextValidate validate this invoke o k body based on the context it is used
func (*InvokeOKBody) MarshalBinary ¶
func (o *InvokeOKBody) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InvokeOKBody) UnmarshalBinary ¶
func (o *InvokeOKBody) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InvokeParams ¶
type InvokeParams struct { // Body. Body *models.Object // Name. Name string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
InvokeParams contains all the parameters to send to the API endpoint
for the invoke operation. Typically these are written to a http.Request.
func NewInvokeParams ¶
func NewInvokeParams() *InvokeParams
NewInvokeParams creates a new InvokeParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewInvokeParamsWithContext ¶
func NewInvokeParamsWithContext(ctx context.Context) *InvokeParams
NewInvokeParamsWithContext creates a new InvokeParams object with the ability to set a context for a request.
func NewInvokeParamsWithHTTPClient ¶
func NewInvokeParamsWithHTTPClient(client *http.Client) *InvokeParams
NewInvokeParamsWithHTTPClient creates a new InvokeParams object with the ability to set a custom HTTPClient for a request.
func NewInvokeParamsWithTimeout ¶
func NewInvokeParamsWithTimeout(timeout time.Duration) *InvokeParams
NewInvokeParamsWithTimeout creates a new InvokeParams object with the ability to set a timeout on a request.
func (*InvokeParams) SetBody ¶
func (o *InvokeParams) SetBody(body *models.Object)
SetBody adds the body to the invoke params
func (*InvokeParams) SetContext ¶
func (o *InvokeParams) SetContext(ctx context.Context)
SetContext adds the context to the invoke params
func (*InvokeParams) SetDefaults ¶
func (o *InvokeParams) SetDefaults()
SetDefaults hydrates default values in the invoke params (not the query body).
All values with no default are reset to their zero value.
func (*InvokeParams) SetHTTPClient ¶
func (o *InvokeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the invoke params
func (*InvokeParams) SetName ¶
func (o *InvokeParams) SetName(name string)
SetName adds the name to the invoke params
func (*InvokeParams) SetTimeout ¶
func (o *InvokeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the invoke params
func (*InvokeParams) WithBody ¶
func (o *InvokeParams) WithBody(body *models.Object) *InvokeParams
WithBody adds the body to the invoke params
func (*InvokeParams) WithContext ¶
func (o *InvokeParams) WithContext(ctx context.Context) *InvokeParams
WithContext adds the context to the invoke params
func (*InvokeParams) WithDefaults ¶
func (o *InvokeParams) WithDefaults() *InvokeParams
WithDefaults hydrates default values in the invoke params (not the query body).
All values with no default are reset to their zero value.
func (*InvokeParams) WithHTTPClient ¶
func (o *InvokeParams) WithHTTPClient(client *http.Client) *InvokeParams
WithHTTPClient adds the HTTPClient to the invoke params
func (*InvokeParams) WithName ¶
func (o *InvokeParams) WithName(name string) *InvokeParams
WithName adds the name to the invoke params
func (*InvokeParams) WithTimeout ¶
func (o *InvokeParams) WithTimeout(timeout time.Duration) *InvokeParams
WithTimeout adds the timeout to the invoke params
func (*InvokeParams) WriteToRequest ¶
func (o *InvokeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type InvokeReader ¶
type InvokeReader struct {
// contains filtered or unexported fields
}
InvokeReader is a Reader for the Invoke structure.
func (*InvokeReader) ReadResponse ¶
func (o *InvokeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.