Documentation
¶
Overview ¶
Package executor provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewPostExecutorSendRequest(server string, address string, body PostExecutorSendJSONRequestBody) (*http.Request, error)
- func NewPostExecutorSendRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) PostExecutorSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, ...) (*PostExecutorSendResponse, error)
- func (c *ClientWithResponses) PostExecutorSendWithResponse(ctx context.Context, address string, body PostExecutorSendJSONRequestBody, ...) (*PostExecutorSendResponse, error)
- type ClientWithResponsesInterface
- type ExecutorSendRequest
- type ExecutorSendResponse
- type GinServerOptions
- type HttpRequestDoer
- type MiddlewareFunc
- type PostExecutorSendJSONRequestBody
- type PostExecutorSendResponse
- func (r PostExecutorSendResponse) ContentType() string
- func (r PostExecutorSendResponse) GetBody() []byte
- func (r PostExecutorSendResponse) GetJSON200() *ExecutorSendResponse
- func (r PostExecutorSendResponse) GetJSON400() *externalRef0.N400
- func (r PostExecutorSendResponse) GetJSON404() *externalRef0.N404
- func (r PostExecutorSendResponse) GetJSON500() *externalRef0.N500
- func (r PostExecutorSendResponse) Status() string
- func (r PostExecutorSendResponse) StatusCode() int
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostExecutorSendRequest ¶
func NewPostExecutorSendRequest(server string, address string, body PostExecutorSendJSONRequestBody) (*http.Request, error)
NewPostExecutorSendRequest calls the generic PostExecutorSend builder with application/json body
func NewPostExecutorSendRequestWithBody ¶
func NewPostExecutorSendRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)
NewPostExecutorSendRequestWithBody constructs an http.Request for the PostExecutorSend method, with any body, and a specified content type
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) PostExecutorSend ¶
func (c *Client) PostExecutorSend(ctx context.Context, address string, body PostExecutorSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostExecutorSend performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request. Takes a body of the `application/json` content type.
Get the explicit disclosures for sending a message using this Executor.
func (*Client) PostExecutorSendWithBody ¶
func (c *Client) PostExecutorSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostExecutorSendWithBody performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request, with any type of body and a specified content type.
Get the explicit disclosures for sending a message using this Executor.
type ClientInterface ¶
type ClientInterface interface {
// PostExecutorSendWithBody performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request,
// with any type of body and a specified content type.
//
// Get the explicit disclosures for sending a message using this Executor.
PostExecutorSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostExecutorSend performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request.
// Takes a body of the `application/json` content type.
//
// Get the explicit disclosures for sending a message using this Executor.
PostExecutorSend(ctx context.Context, address string, body PostExecutorSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) PostExecutorSendWithBodyWithResponse ¶
func (c *ClientWithResponses) PostExecutorSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostExecutorSendResponse, error)
PostExecutorSendWithBodyWithResponse performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request, with any type of body and a specified content type.
Get the explicit disclosures for sending a message using this Executor.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) PostExecutorSendWithResponse ¶
func (c *ClientWithResponses) PostExecutorSendWithResponse(ctx context.Context, address string, body PostExecutorSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostExecutorSendResponse, error)
PostExecutorSendWithResponse performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Get the explicit disclosures for sending a message using this Executor.
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostExecutorSendWithBodyWithResponse performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request,
// with any type of body and a specified content type.
//
// Get the explicit disclosures for sending a message using this Executor.
//
// Returns a wrapper object for the known response body format(s).
PostExecutorSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostExecutorSendResponse, error)
// PostExecutorSendWithResponse performs a POST /ccip/v1/external/executor/{address}/send (the `PostExecutorSend` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Get the explicit disclosures for sending a message using this Executor.
PostExecutorSendWithResponse(ctx context.Context, address string, body PostExecutorSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostExecutorSendResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ExecutorSendRequest ¶
type ExecutorSendRequest struct {
Ccvs []externalRef0.RawOrHashedAddress `json:"ccvs"`
// Message A message to be sent from Canton.
Message externalRef0.Message `json:"message"`
}
ExecutorSendRequest defines model for ExecutorSendRequest.
type ExecutorSendResponse ¶
type ExecutorSendResponse struct {
// ContextData The context to be passed along to the Executor.
ContextData map[string]interface{} `json:"contextData"`
// ContractId The unique identifier of a contract.
//
// Example: 00929f6a675c128bb54bef77a8cad8d330badd4330cf71f6a19b596b01f4b66b2dca121220cd655ce27fae64bdf6a203fcd987727de81c3762e46b1882ce2c2fbf0a72c64f
ContractId externalRef0.ContractId `json:"contractId"`
DisclosedContracts []externalRef0.DisclosedContract `json:"disclosedContracts"`
// InstanceAddress The InstanceAddress of a contract, the keccak256 hash of the RawInstanceAddress.
//
// Example: 0x9d24274102a5d2f57506d48dee1394e33f7cef9a9c0920ee714d6f4a216a21a9
InstanceAddress externalRef0.InstanceAddress `json:"instanceAddress"`
// RawInstanceAddress The raw InstanceAddress of a contract, in the form of "prefix@owner", where prefix is the InstanceId of the contract.
//
// Example: some-contract-fgtlw@ccipOwner::1220131b86f50178e6f7aabe62ef79e79b4964a526a1c557776409f448cbcd2406ce
RawInstanceAddress externalRef0.RawInstanceAddress `json:"rawInstanceAddress"`
}
ExecutorSendResponse defines model for ExecutorSendResponse.
type GinServerOptions ¶
type GinServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
GinServerOptions provides options for the Gin server.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type MiddlewareFunc ¶
type PostExecutorSendJSONRequestBody ¶
type PostExecutorSendJSONRequestBody = ExecutorSendRequest
PostExecutorSendJSONRequestBody defines body for PostExecutorSend for application/json ContentType.
type PostExecutorSendResponse ¶
type PostExecutorSendResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ExecutorSendResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *externalRef0.N400
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *externalRef0.N404
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *externalRef0.N500
}
func ParsePostExecutorSendResponse ¶
func ParsePostExecutorSendResponse(rsp *http.Response) (*PostExecutorSendResponse, error)
ParsePostExecutorSendResponse parses an HTTP response from a PostExecutorSendWithResponse call
func (PostExecutorSendResponse) ContentType ¶
func (r PostExecutorSendResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostExecutorSendResponse) GetBody ¶
func (r PostExecutorSendResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostExecutorSendResponse) GetJSON200 ¶
func (r PostExecutorSendResponse) GetJSON200() *ExecutorSendResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PostExecutorSendResponse) GetJSON400 ¶
func (r PostExecutorSendResponse) GetJSON400() *externalRef0.N400
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (PostExecutorSendResponse) GetJSON404 ¶
func (r PostExecutorSendResponse) GetJSON404() *externalRef0.N404
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (PostExecutorSendResponse) GetJSON500 ¶
func (r PostExecutorSendResponse) GetJSON500() *externalRef0.N500
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostExecutorSendResponse) Status ¶
func (r PostExecutorSendResponse) Status() string
Status returns HTTPResponse.Status
func (PostExecutorSendResponse) StatusCode ¶
func (r PostExecutorSendResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface {
// (POST /ccip/v1/external/executor/{address}/send)
PostExecutorSend(c *gin.Context, address string)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) PostExecutorSend ¶
func (siw *ServerInterfaceWrapper) PostExecutorSend(c *gin.Context)
PostExecutorSend operation middleware