Documentation
¶
Overview ¶
Package global 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 NewPostGetExplicitDisclosureBatchRequest(server string, body PostGetExplicitDisclosureBatchJSONRequestBody) (*http.Request, error)
- func NewPostGetExplicitDisclosureBatchRequestWithBody(server 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) PostGetExplicitDisclosureBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostGetExplicitDisclosureBatchResponse, error)
- func (c *ClientWithResponses) PostGetExplicitDisclosureBatchWithResponse(ctx context.Context, body PostGetExplicitDisclosureBatchJSONRequestBody, ...) (*PostGetExplicitDisclosureBatchResponse, error)
- type ClientWithResponsesInterface
- type GetExplicitDisclosureBatchRequest
- type GetExplicitDisclosureBatchResponse
- type GinServerOptions
- type HttpRequestDoer
- type MiddlewareFunc
- type PostGetExplicitDisclosureBatchJSONRequestBody
- type PostGetExplicitDisclosureBatchResponse
- func (r PostGetExplicitDisclosureBatchResponse) ContentType() string
- func (r PostGetExplicitDisclosureBatchResponse) GetBody() []byte
- func (r PostGetExplicitDisclosureBatchResponse) GetJSON200() *GetExplicitDisclosureBatchResponse
- func (r PostGetExplicitDisclosureBatchResponse) GetJSON400() *externalRef0.N400
- func (r PostGetExplicitDisclosureBatchResponse) GetJSON404() *externalRef0.N404
- func (r PostGetExplicitDisclosureBatchResponse) GetJSON500() *externalRef0.N500
- func (r PostGetExplicitDisclosureBatchResponse) Status() string
- func (r PostGetExplicitDisclosureBatchResponse) StatusCode() int
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostGetExplicitDisclosureBatchRequest ¶
func NewPostGetExplicitDisclosureBatchRequest(server string, body PostGetExplicitDisclosureBatchJSONRequestBody) (*http.Request, error)
NewPostGetExplicitDisclosureBatchRequest calls the generic PostGetExplicitDisclosureBatch builder with application/json body
func NewPostGetExplicitDisclosureBatchRequestWithBody ¶
func NewPostGetExplicitDisclosureBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostGetExplicitDisclosureBatchRequestWithBody constructs an http.Request for the PostGetExplicitDisclosureBatch 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) PostGetExplicitDisclosureBatch ¶
func (c *Client) PostGetExplicitDisclosureBatch(ctx context.Context, body PostGetExplicitDisclosureBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostGetExplicitDisclosureBatch performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` operationId) request. Takes a body of the `application/json` content type.
Get the explicit disclosures for one or multiple contracts.
func (*Client) PostGetExplicitDisclosureBatchWithBody ¶
func (c *Client) PostGetExplicitDisclosureBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostGetExplicitDisclosureBatchWithBody performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` operationId) request, with any type of body and a specified content type.
Get the explicit disclosures for one or multiple contracts.
type ClientInterface ¶
type ClientInterface interface {
// PostGetExplicitDisclosureBatchWithBody performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` operationId) request,
// with any type of body and a specified content type.
//
// Get the explicit disclosures for one or multiple contracts.
PostGetExplicitDisclosureBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostGetExplicitDisclosureBatch performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` operationId) request.
// Takes a body of the `application/json` content type.
//
// Get the explicit disclosures for one or multiple contracts.
PostGetExplicitDisclosureBatch(ctx context.Context, body PostGetExplicitDisclosureBatchJSONRequestBody, 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) PostGetExplicitDisclosureBatchWithBodyWithResponse ¶
func (c *ClientWithResponses) PostGetExplicitDisclosureBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGetExplicitDisclosureBatchResponse, error)
PostGetExplicitDisclosureBatchWithBodyWithResponse performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` operationId) request, with any type of body and a specified content type.
Get the explicit disclosures for one or multiple contracts.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) PostGetExplicitDisclosureBatchWithResponse ¶
func (c *ClientWithResponses) PostGetExplicitDisclosureBatchWithResponse(ctx context.Context, body PostGetExplicitDisclosureBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGetExplicitDisclosureBatchResponse, error)
PostGetExplicitDisclosureBatchWithResponse performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` 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 one or multiple contracts.
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostGetExplicitDisclosureBatchWithBodyWithResponse performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` operationId) request,
// with any type of body and a specified content type.
//
// Get the explicit disclosures for one or multiple contracts.
//
// Returns a wrapper object for the known response body format(s).
PostGetExplicitDisclosureBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGetExplicitDisclosureBatchResponse, error)
// PostGetExplicitDisclosureBatchWithResponse performs a POST /ccip/v1/global/disclosure/batch (the `PostGetExplicitDisclosureBatch` 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 one or multiple contracts.
PostGetExplicitDisclosureBatchWithResponse(ctx context.Context, body PostGetExplicitDisclosureBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGetExplicitDisclosureBatchResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetExplicitDisclosureBatchRequest ¶
type GetExplicitDisclosureBatchRequest struct {
// Addresses A list of addresses to get explicit disclosures for. Can be either RawInstanceAddresses or InstanceAddresses.
Addresses []externalRef0.RawOrHashedAddress `json:"addresses"`
}
GetExplicitDisclosureBatchRequest defines model for GetExplicitDisclosureBatchRequest.
type GetExplicitDisclosureBatchResponse ¶
type GetExplicitDisclosureBatchResponse struct {
// Disclosures A list of explicit disclosures for the requested addresses. The order of the responses corresponds to the order of the requests.
// If any explicit disclosure for a requested address cannot be found, the request will fail.
Disclosures []externalRef0.DisclosedContract `json:"disclosures"`
}
GetExplicitDisclosureBatchResponse defines model for GetExplicitDisclosureBatchResponse.
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 PostGetExplicitDisclosureBatchJSONRequestBody ¶
type PostGetExplicitDisclosureBatchJSONRequestBody = GetExplicitDisclosureBatchRequest
PostGetExplicitDisclosureBatchJSONRequestBody defines body for PostGetExplicitDisclosureBatch for application/json ContentType.
type PostGetExplicitDisclosureBatchResponse ¶
type PostGetExplicitDisclosureBatchResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GetExplicitDisclosureBatchResponse
// 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 ParsePostGetExplicitDisclosureBatchResponse ¶
func ParsePostGetExplicitDisclosureBatchResponse(rsp *http.Response) (*PostGetExplicitDisclosureBatchResponse, error)
ParsePostGetExplicitDisclosureBatchResponse parses an HTTP response from a PostGetExplicitDisclosureBatchWithResponse call
func (PostGetExplicitDisclosureBatchResponse) ContentType ¶
func (r PostGetExplicitDisclosureBatchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostGetExplicitDisclosureBatchResponse) GetBody ¶
func (r PostGetExplicitDisclosureBatchResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostGetExplicitDisclosureBatchResponse) GetJSON200 ¶
func (r PostGetExplicitDisclosureBatchResponse) GetJSON200() *GetExplicitDisclosureBatchResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PostGetExplicitDisclosureBatchResponse) GetJSON400 ¶
func (r PostGetExplicitDisclosureBatchResponse) GetJSON400() *externalRef0.N400
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (PostGetExplicitDisclosureBatchResponse) GetJSON404 ¶
func (r PostGetExplicitDisclosureBatchResponse) GetJSON404() *externalRef0.N404
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (PostGetExplicitDisclosureBatchResponse) GetJSON500 ¶
func (r PostGetExplicitDisclosureBatchResponse) GetJSON500() *externalRef0.N500
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostGetExplicitDisclosureBatchResponse) Status ¶
func (r PostGetExplicitDisclosureBatchResponse) Status() string
Status returns HTTPResponse.Status
func (PostGetExplicitDisclosureBatchResponse) StatusCode ¶
func (r PostGetExplicitDisclosureBatchResponse) 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/global/disclosure/batch)
PostGetExplicitDisclosureBatch(c *gin.Context)
}
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) PostGetExplicitDisclosureBatch ¶
func (siw *ServerInterfaceWrapper) PostGetExplicitDisclosureBatch(c *gin.Context)
PostGetExplicitDisclosureBatch operation middleware