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.5.1 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
- 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 generates requests for PostExecutorSend with any type of body
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)
type ClientInterface ¶
type ClientInterface interface {
// PostExecutorSendWithBody request with any body
PostExecutorSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
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 request with arbitrary body returning *PostExecutorSendResponse
func (*ClientWithResponses) PostExecutorSendWithResponse ¶
func (c *ClientWithResponses) PostExecutorSendWithResponse(ctx context.Context, address string, body PostExecutorSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostExecutorSendResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostExecutorSendWithBodyWithResponse request with any body
PostExecutorSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostExecutorSendResponse, error)
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.
ContractId externalRef0.ContractId `json:"contractId"`
DisclosedContracts []externalRef0.DisclosedContract `json:"disclosedContracts"`
// InstanceAddress The InstanceAddress of a contract, the keccak256 hash of the RawInstanceAddress.
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.
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 *ExecutorSendResponse
JSON400 *externalRef0.N400
JSON404 *externalRef0.N404
JSON500 *externalRef0.N500
}
func ParsePostExecutorSendResponse ¶
func ParsePostExecutorSendResponse(rsp *http.Response) (*PostExecutorSendResponse, error)
ParsePostExecutorSendResponse parses an HTTP response from a PostExecutorSendWithResponse call
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