Documentation
¶
Overview ¶
Package tokenpool 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 NewPostTokenPoolExecuteRequest(server string, address string, body PostTokenPoolExecuteJSONRequestBody) (*http.Request, error)
- func NewPostTokenPoolExecuteRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostTokenPoolSendRequest(server string, address string, body PostTokenPoolSendJSONRequestBody) (*http.Request, error)
- func NewPostTokenPoolSendRequestWithBody(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
- func (c *Client) PostTokenPoolExecute(ctx context.Context, address string, body PostTokenPoolExecuteJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostTokenPoolExecuteWithBody(ctx context.Context, address string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostTokenPoolSend(ctx context.Context, address string, body PostTokenPoolSendJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostTokenPoolSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) PostTokenPoolExecuteWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, ...) (*PostTokenPoolExecuteResponse, error)
- func (c *ClientWithResponses) PostTokenPoolExecuteWithResponse(ctx context.Context, address string, body PostTokenPoolExecuteJSONRequestBody, ...) (*PostTokenPoolExecuteResponse, error)
- func (c *ClientWithResponses) PostTokenPoolSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, ...) (*PostTokenPoolSendResponse, error)
- func (c *ClientWithResponses) PostTokenPoolSendWithResponse(ctx context.Context, address string, body PostTokenPoolSendJSONRequestBody, ...) (*PostTokenPoolSendResponse, error)
- type ClientWithResponsesInterface
- type GinServerOptions
- type HttpRequestDoer
- type MiddlewareFunc
- type PostTokenPoolExecuteJSONRequestBody
- type PostTokenPoolExecuteResponse
- type PostTokenPoolSendJSONRequestBody
- type PostTokenPoolSendResponse
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
- type TokenPoolExecuteRequest
- type TokenPoolExecuteResponse
- type TokenPoolSendRequest
- type TokenPoolSendResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostTokenPoolExecuteRequest ¶
func NewPostTokenPoolExecuteRequest(server string, address string, body PostTokenPoolExecuteJSONRequestBody) (*http.Request, error)
NewPostTokenPoolExecuteRequest calls the generic PostTokenPoolExecute builder with application/json body
func NewPostTokenPoolExecuteRequestWithBody ¶
func NewPostTokenPoolExecuteRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)
NewPostTokenPoolExecuteRequestWithBody generates requests for PostTokenPoolExecute with any type of body
func NewPostTokenPoolSendRequest ¶
func NewPostTokenPoolSendRequest(server string, address string, body PostTokenPoolSendJSONRequestBody) (*http.Request, error)
NewPostTokenPoolSendRequest calls the generic PostTokenPoolSend builder with application/json body
func NewPostTokenPoolSendRequestWithBody ¶
func NewPostTokenPoolSendRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)
NewPostTokenPoolSendRequestWithBody generates requests for PostTokenPoolSend 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) PostTokenPoolExecute ¶
func (c *Client) PostTokenPoolExecute(ctx context.Context, address string, body PostTokenPoolExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostTokenPoolExecuteWithBody ¶
func (*Client) PostTokenPoolSend ¶
func (c *Client) PostTokenPoolSend(ctx context.Context, address string, body PostTokenPoolSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// PostTokenPoolExecuteWithBody request with any body
PostTokenPoolExecuteWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostTokenPoolExecute(ctx context.Context, address string, body PostTokenPoolExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostTokenPoolSendWithBody request with any body
PostTokenPoolSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostTokenPoolSend(ctx context.Context, address string, body PostTokenPoolSendJSONRequestBody, 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) PostTokenPoolExecuteWithBodyWithResponse ¶
func (c *ClientWithResponses) PostTokenPoolExecuteWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTokenPoolExecuteResponse, error)
PostTokenPoolExecuteWithBodyWithResponse request with arbitrary body returning *PostTokenPoolExecuteResponse
func (*ClientWithResponses) PostTokenPoolExecuteWithResponse ¶
func (c *ClientWithResponses) PostTokenPoolExecuteWithResponse(ctx context.Context, address string, body PostTokenPoolExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTokenPoolExecuteResponse, error)
func (*ClientWithResponses) PostTokenPoolSendWithBodyWithResponse ¶
func (c *ClientWithResponses) PostTokenPoolSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTokenPoolSendResponse, error)
PostTokenPoolSendWithBodyWithResponse request with arbitrary body returning *PostTokenPoolSendResponse
func (*ClientWithResponses) PostTokenPoolSendWithResponse ¶
func (c *ClientWithResponses) PostTokenPoolSendWithResponse(ctx context.Context, address string, body PostTokenPoolSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTokenPoolSendResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostTokenPoolExecuteWithBodyWithResponse request with any body
PostTokenPoolExecuteWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTokenPoolExecuteResponse, error)
PostTokenPoolExecuteWithResponse(ctx context.Context, address string, body PostTokenPoolExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTokenPoolExecuteResponse, error)
// PostTokenPoolSendWithBodyWithResponse request with any body
PostTokenPoolSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTokenPoolSendResponse, error)
PostTokenPoolSendWithResponse(ctx context.Context, address string, body PostTokenPoolSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTokenPoolSendResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
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 PostTokenPoolExecuteJSONRequestBody ¶
type PostTokenPoolExecuteJSONRequestBody = TokenPoolExecuteRequest
PostTokenPoolExecuteJSONRequestBody defines body for PostTokenPoolExecute for application/json ContentType.
type PostTokenPoolExecuteResponse ¶
type PostTokenPoolExecuteResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TokenPoolExecuteResponse
JSON400 *externalRef0.N400
JSON404 *externalRef0.N404
JSON500 *externalRef0.N500
}
func ParsePostTokenPoolExecuteResponse ¶
func ParsePostTokenPoolExecuteResponse(rsp *http.Response) (*PostTokenPoolExecuteResponse, error)
ParsePostTokenPoolExecuteResponse parses an HTTP response from a PostTokenPoolExecuteWithResponse call
func (PostTokenPoolExecuteResponse) Status ¶
func (r PostTokenPoolExecuteResponse) Status() string
Status returns HTTPResponse.Status
func (PostTokenPoolExecuteResponse) StatusCode ¶
func (r PostTokenPoolExecuteResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostTokenPoolSendJSONRequestBody ¶
type PostTokenPoolSendJSONRequestBody = TokenPoolSendRequest
PostTokenPoolSendJSONRequestBody defines body for PostTokenPoolSend for application/json ContentType.
type PostTokenPoolSendResponse ¶
type PostTokenPoolSendResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TokenPoolSendResponse
JSON400 *externalRef0.N400
JSON404 *externalRef0.N404
JSON500 *externalRef0.N500
}
func ParsePostTokenPoolSendResponse ¶
func ParsePostTokenPoolSendResponse(rsp *http.Response) (*PostTokenPoolSendResponse, error)
ParsePostTokenPoolSendResponse parses an HTTP response from a PostTokenPoolSendWithResponse call
func (PostTokenPoolSendResponse) Status ¶
func (r PostTokenPoolSendResponse) Status() string
Status returns HTTPResponse.Status
func (PostTokenPoolSendResponse) StatusCode ¶
func (r PostTokenPoolSendResponse) 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/tokenPool/{address}/execute)
PostTokenPoolExecute(c *gin.Context, address string)
// (POST /ccip/v1/external/tokenPool/{address}/send)
PostTokenPoolSend(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) PostTokenPoolExecute ¶
func (siw *ServerInterfaceWrapper) PostTokenPoolExecute(c *gin.Context)
PostTokenPoolExecute operation middleware
func (*ServerInterfaceWrapper) PostTokenPoolSend ¶
func (siw *ServerInterfaceWrapper) PostTokenPoolSend(c *gin.Context)
PostTokenPoolSend operation middleware
type TokenPoolExecuteRequest ¶
type TokenPoolExecuteRequest struct {
// EncodedMessage The CCIP message to be executed, encoded as a hex string.
EncodedMessage string `json:"encodedMessage"`
}
TokenPoolExecuteRequest defines model for TokenPoolExecuteRequest.
type TokenPoolExecuteResponse ¶
type TokenPoolExecuteResponse struct {
// ContextData The context to be passed along to the token pool.
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"`
RequiredCCVs []externalRef0.RawOrHashedAddress `json:"requiredCCVs"`
}
TokenPoolExecuteResponse defines model for TokenPoolExecuteResponse.
type TokenPoolSendRequest ¶
type TokenPoolSendRequest struct {
// Message A message to be sent from Canton.
Message externalRef0.Message `json:"message"`
}
TokenPoolSendRequest defines model for TokenPoolSendRequest.
type TokenPoolSendResponse ¶
type TokenPoolSendResponse struct {
// ContextData The context to be passed along to the token pool.
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"`
RequiredCCVs []externalRef0.RawOrHashedAddress `json:"requiredCCVs"`
}
TokenPoolSendResponse defines model for TokenPoolSendResponse.