ccv

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package ccv 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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostCCVExecuteRequest

func NewPostCCVExecuteRequest(server string, address string, body PostCCVExecuteJSONRequestBody) (*http.Request, error)

NewPostCCVExecuteRequest calls the generic PostCCVExecute builder with application/json body

func NewPostCCVExecuteRequestWithBody

func NewPostCCVExecuteRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)

NewPostCCVExecuteRequestWithBody constructs an http.Request for the PostCCVExecute method, with any body, and a specified content type

func NewPostCCVSendRequest

func NewPostCCVSendRequest(server string, address string, body PostCCVSendJSONRequestBody) (*http.Request, error)

NewPostCCVSendRequest calls the generic PostCCVSend builder with application/json body

func NewPostCCVSendRequestWithBody

func NewPostCCVSendRequestWithBody(server string, address string, contentType string, body io.Reader) (*http.Request, error)

NewPostCCVSendRequestWithBody constructs an http.Request for the PostCCVSend 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 CCVExecuteRequest

type CCVExecuteRequest struct {
	// EncodedMessage The CCIP message to be executed, encoded as a hex string.
	EncodedMessage string `json:"encodedMessage"`

	// Receiver The unique identifier of a party.
	//
	// Example: some-party::1220131b86f50178e6f7aabe62ef79e79b4964a526a1c557776409f448cbcd2406ce
	Receiver externalRef0.PartyId `json:"receiver"`
}

CCVExecuteRequest defines model for CCVExecuteRequest.

type CCVExecuteResponse

type CCVExecuteResponse struct {
	// ContextData The context to be passed along to the verifier.
	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"`
}

CCVExecuteResponse defines model for CCVExecuteResponse.

type CCVSendRequest

type CCVSendRequest struct {
	// Message A message to be sent from Canton.
	Message externalRef0.Message `json:"message"`
}

CCVSendRequest defines model for CCVSendRequest.

type CCVSendResponse

type CCVSendResponse struct {
	// ContextData The context to be passed along to the verifier.
	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"`
}

CCVSendResponse defines model for CCVSendResponse.

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) PostCCVExecute

func (c *Client) PostCCVExecute(ctx context.Context, address string, body PostCCVExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

PostCCVExecute performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` operationId) request. Takes a body of the `application/json` content type.

Get the explicit disclosures for executing a message using this Cross-Chain-Verifier.

func (*Client) PostCCVExecuteWithBody

func (c *Client) PostCCVExecuteWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

PostCCVExecuteWithBody performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` operationId) request, with any type of body and a specified content type.

Get the explicit disclosures for executing a message using this Cross-Chain-Verifier.

func (*Client) PostCCVSend

func (c *Client) PostCCVSend(ctx context.Context, address string, body PostCCVSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

PostCCVSend performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` operationId) request. Takes a body of the `application/json` content type.

Get the explicit disclosures for sending a message using this Cross-Chain-Verifier.

func (*Client) PostCCVSendWithBody

func (c *Client) PostCCVSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

PostCCVSendWithBody performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` operationId) request, with any type of body and a specified content type.

Get the explicit disclosures for sending a message using this Cross-Chain-Verifier.

type ClientInterface

type ClientInterface interface {

	// PostCCVExecuteWithBody performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the explicit disclosures for executing a message using this Cross-Chain-Verifier.
	PostCCVExecuteWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostCCVExecute performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` operationId) request.
	// Takes a body of the `application/json` content type.
	//
	// Get the explicit disclosures for executing a message using this Cross-Chain-Verifier.
	PostCCVExecute(ctx context.Context, address string, body PostCCVExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostCCVSendWithBody performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the explicit disclosures for sending a message using this Cross-Chain-Verifier.
	PostCCVSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostCCVSend performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` operationId) request.
	// Takes a body of the `application/json` content type.
	//
	// Get the explicit disclosures for sending a message using this Cross-Chain-Verifier.
	PostCCVSend(ctx context.Context, address string, body PostCCVSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) PostCCVExecuteWithBodyWithResponse

func (c *ClientWithResponses) PostCCVExecuteWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCCVExecuteResponse, error)

PostCCVExecuteWithBodyWithResponse performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` operationId) request, with any type of body and a specified content type.

Get the explicit disclosures for executing a message using this Cross-Chain-Verifier.

Returns a wrapper object for the known response body format(s).

func (*ClientWithResponses) PostCCVExecuteWithResponse

func (c *ClientWithResponses) PostCCVExecuteWithResponse(ctx context.Context, address string, body PostCCVExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCCVExecuteResponse, error)

PostCCVExecuteWithResponse performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` 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 executing a message using this Cross-Chain-Verifier.

func (*ClientWithResponses) PostCCVSendWithBodyWithResponse

func (c *ClientWithResponses) PostCCVSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCCVSendResponse, error)

PostCCVSendWithBodyWithResponse performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` operationId) request, with any type of body and a specified content type.

Get the explicit disclosures for sending a message using this Cross-Chain-Verifier.

Returns a wrapper object for the known response body format(s).

func (*ClientWithResponses) PostCCVSendWithResponse

func (c *ClientWithResponses) PostCCVSendWithResponse(ctx context.Context, address string, body PostCCVSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCCVSendResponse, error)

PostCCVSendWithResponse performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` 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 Cross-Chain-Verifier.

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// PostCCVExecuteWithBodyWithResponse performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the explicit disclosures for executing a message using this Cross-Chain-Verifier.
	//
	// Returns a wrapper object for the known response body format(s).
	PostCCVExecuteWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCCVExecuteResponse, error)

	// PostCCVExecuteWithResponse performs a POST /ccip/v1/external/ccv/{address}/execute (the `PostCCVExecute` 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 executing a message using this Cross-Chain-Verifier.
	PostCCVExecuteWithResponse(ctx context.Context, address string, body PostCCVExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCCVExecuteResponse, error)

	// PostCCVSendWithBodyWithResponse performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the explicit disclosures for sending a message using this Cross-Chain-Verifier.
	//
	// Returns a wrapper object for the known response body format(s).
	PostCCVSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCCVSendResponse, error)

	// PostCCVSendWithResponse performs a POST /ccip/v1/external/ccv/{address}/send (the `PostCCVSend` 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 Cross-Chain-Verifier.
	PostCCVSendWithResponse(ctx context.Context, address string, body PostCCVSendJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCCVSendResponse, 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

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MiddlewareFunc

type MiddlewareFunc func(c *gin.Context)

type PostCCVExecuteJSONRequestBody

type PostCCVExecuteJSONRequestBody = CCVExecuteRequest

PostCCVExecuteJSONRequestBody defines body for PostCCVExecute for application/json ContentType.

type PostCCVExecuteResponse

type PostCCVExecuteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *CCVExecuteResponse
	// 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 ParsePostCCVExecuteResponse

func ParsePostCCVExecuteResponse(rsp *http.Response) (*PostCCVExecuteResponse, error)

ParsePostCCVExecuteResponse parses an HTTP response from a PostCCVExecuteWithResponse call

func (PostCCVExecuteResponse) ContentType

func (r PostCCVExecuteResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (PostCCVExecuteResponse) GetBody

func (r PostCCVExecuteResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostCCVExecuteResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (PostCCVExecuteResponse) GetJSON400

func (r PostCCVExecuteResponse) GetJSON400() *externalRef0.N400

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (PostCCVExecuteResponse) GetJSON404

func (r PostCCVExecuteResponse) GetJSON404() *externalRef0.N404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (PostCCVExecuteResponse) GetJSON500

func (r PostCCVExecuteResponse) GetJSON500() *externalRef0.N500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (PostCCVExecuteResponse) Status

func (r PostCCVExecuteResponse) Status() string

Status returns HTTPResponse.Status

func (PostCCVExecuteResponse) StatusCode

func (r PostCCVExecuteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostCCVSendJSONRequestBody

type PostCCVSendJSONRequestBody = CCVSendRequest

PostCCVSendJSONRequestBody defines body for PostCCVSend for application/json ContentType.

type PostCCVSendResponse

type PostCCVSendResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *CCVSendResponse
	// 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 ParsePostCCVSendResponse

func ParsePostCCVSendResponse(rsp *http.Response) (*PostCCVSendResponse, error)

ParsePostCCVSendResponse parses an HTTP response from a PostCCVSendWithResponse call

func (PostCCVSendResponse) ContentType

func (r PostCCVSendResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (PostCCVSendResponse) GetBody

func (r PostCCVSendResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PostCCVSendResponse) GetJSON200

func (r PostCCVSendResponse) GetJSON200() *CCVSendResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (PostCCVSendResponse) GetJSON400

func (r PostCCVSendResponse) GetJSON400() *externalRef0.N400

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (PostCCVSendResponse) GetJSON404

func (r PostCCVSendResponse) GetJSON404() *externalRef0.N404

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (PostCCVSendResponse) GetJSON500

func (r PostCCVSendResponse) GetJSON500() *externalRef0.N500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (PostCCVSendResponse) Status

func (r PostCCVSendResponse) Status() string

Status returns HTTPResponse.Status

func (PostCCVSendResponse) StatusCode

func (r PostCCVSendResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ServerInterface

type ServerInterface interface {

	// (POST /ccip/v1/external/ccv/{address}/execute)
	PostCCVExecute(c *gin.Context, address string)

	// (POST /ccip/v1/external/ccv/{address}/send)
	PostCCVSend(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) PostCCVExecute

func (siw *ServerInterfaceWrapper) PostCCVExecute(c *gin.Context)

PostCCVExecute operation middleware

func (*ServerInterfaceWrapper) PostCCVSend

func (siw *ServerInterfaceWrapper) PostCCVSend(c *gin.Context)

PostCCVSend operation middleware

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL