ccv

package
v0.0.0-...-346157b Latest Latest
Warning

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

Go to latest
Published: May 27, 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.5.1 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 generates requests for PostCCVExecute with any type of body

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 generates requests for PostCCVSend 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 CCVExecuteRequest

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

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.
	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"`
}

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.
	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"`
}

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)

func (*Client) PostCCVExecuteWithBody

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

func (*Client) PostCCVSend

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

func (*Client) PostCCVSendWithBody

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

type ClientInterface

type ClientInterface interface {
	// PostCCVExecuteWithBody request with any body
	PostCCVExecuteWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// PostCCVSendWithBody request with any body
	PostCCVSendWithBody(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	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 request with arbitrary body returning *PostCCVExecuteResponse

func (*ClientWithResponses) PostCCVExecuteWithResponse

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

func (*ClientWithResponses) PostCCVSendWithBodyWithResponse

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

PostCCVSendWithBodyWithResponse request with arbitrary body returning *PostCCVSendResponse

func (*ClientWithResponses) PostCCVSendWithResponse

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

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostCCVExecuteWithBodyWithResponse request with any body
	PostCCVExecuteWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCCVExecuteResponse, error)

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

	// PostCCVSendWithBodyWithResponse request with any body
	PostCCVSendWithBodyWithResponse(ctx context.Context, address string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCCVSendResponse, error)

	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      *CCVExecuteResponse
	JSON400      *externalRef0.N400
	JSON404      *externalRef0.N404
	JSON500      *externalRef0.N500
}

func ParsePostCCVExecuteResponse

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

ParsePostCCVExecuteResponse parses an HTTP response from a PostCCVExecuteWithResponse call

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      *CCVSendResponse
	JSON400      *externalRef0.N400
	JSON404      *externalRef0.N404
	JSON500      *externalRef0.N500
}

func ParsePostCCVSendResponse

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

ParsePostCCVSendResponse parses an HTTP response from a PostCCVSendWithResponse call

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