transferInstructionV1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package transferInstructionV1 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 NewGetTransferFactoryRequest

func NewGetTransferFactoryRequest(server string, body GetTransferFactoryJSONRequestBody) (*http.Request, error)

NewGetTransferFactoryRequest calls the generic GetTransferFactory builder with application/json body

func NewGetTransferFactoryRequestWithBody

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

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

func NewGetTransferInstructionAcceptContextRequest

func NewGetTransferInstructionAcceptContextRequest(server string, transferInstructionId string, body GetTransferInstructionAcceptContextJSONRequestBody) (*http.Request, error)

NewGetTransferInstructionAcceptContextRequest calls the generic GetTransferInstructionAcceptContext builder with application/json body

func NewGetTransferInstructionAcceptContextRequestWithBody

func NewGetTransferInstructionAcceptContextRequestWithBody(server string, transferInstructionId string, contentType string, body io.Reader) (*http.Request, error)

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

func NewGetTransferInstructionRejectContextRequest

func NewGetTransferInstructionRejectContextRequest(server string, transferInstructionId string, body GetTransferInstructionRejectContextJSONRequestBody) (*http.Request, error)

NewGetTransferInstructionRejectContextRequest calls the generic GetTransferInstructionRejectContext builder with application/json body

func NewGetTransferInstructionRejectContextRequestWithBody

func NewGetTransferInstructionRejectContextRequestWithBody(server string, transferInstructionId string, contentType string, body io.Reader) (*http.Request, error)

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

func NewGetTransferInstructionWithdrawContextRequest

func NewGetTransferInstructionWithdrawContextRequest(server string, transferInstructionId string, body GetTransferInstructionWithdrawContextJSONRequestBody) (*http.Request, error)

NewGetTransferInstructionWithdrawContextRequest calls the generic GetTransferInstructionWithdrawContext builder with application/json body

func NewGetTransferInstructionWithdrawContextRequestWithBody

func NewGetTransferInstructionWithdrawContextRequestWithBody(server string, transferInstructionId string, contentType string, body io.Reader) (*http.Request, error)

NewGetTransferInstructionWithdrawContextRequestWithBody constructs an http.Request for the GetTransferInstructionWithdrawContext 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 ChoiceContext

type ChoiceContext struct {
	// ChoiceContextData The additional data to use when exercising the choice.
	ChoiceContextData map[string]interface{} `json:"choiceContextData"`

	// DisclosedContracts The contracts that are required to be disclosed to the participant node for exercising
	// the choice.
	DisclosedContracts []DisclosedContract `json:"disclosedContracts"`
}

ChoiceContext The context required to exercise a choice on a contract via an interface. Used to retrieve additional reference data that is passed in via disclosed contracts, which are in turn referred to via their contract ID in the `choiceContextData`.

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

func (c *Client) GetTransferFactory(ctx context.Context, body GetTransferFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

GetTransferFactory performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` operationId) request. Takes a body of the `application/json` content type.

Get the factory and choice context for executing a direct transfer.

func (*Client) GetTransferFactoryWithBody

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

GetTransferFactoryWithBody performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` operationId) request, with any type of body and a specified content type.

Get the factory and choice context for executing a direct transfer.

func (*Client) GetTransferInstructionAcceptContext

func (c *Client) GetTransferInstructionAcceptContext(ctx context.Context, transferInstructionId string, body GetTransferInstructionAcceptContextJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

GetTransferInstructionAcceptContext performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` operationId) request. Takes a body of the `application/json` content type.

Get the choice context to accept a transfer instruction.

func (*Client) GetTransferInstructionAcceptContextWithBody

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

GetTransferInstructionAcceptContextWithBody performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` operationId) request, with any type of body and a specified content type.

Get the choice context to accept a transfer instruction.

func (*Client) GetTransferInstructionRejectContext

func (c *Client) GetTransferInstructionRejectContext(ctx context.Context, transferInstructionId string, body GetTransferInstructionRejectContextJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

GetTransferInstructionRejectContext performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` operationId) request. Takes a body of the `application/json` content type.

Get the choice context to reject a transfer instruction.

func (*Client) GetTransferInstructionRejectContextWithBody

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

GetTransferInstructionRejectContextWithBody performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` operationId) request, with any type of body and a specified content type.

Get the choice context to reject a transfer instruction.

func (*Client) GetTransferInstructionWithdrawContext

func (c *Client) GetTransferInstructionWithdrawContext(ctx context.Context, transferInstructionId string, body GetTransferInstructionWithdrawContextJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

GetTransferInstructionWithdrawContext performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` operationId) request. Takes a body of the `application/json` content type.

Get the choice context to withdraw a transfer instruction.

func (*Client) GetTransferInstructionWithdrawContextWithBody

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

GetTransferInstructionWithdrawContextWithBody performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` operationId) request, with any type of body and a specified content type.

Get the choice context to withdraw a transfer instruction.

type ClientInterface

type ClientInterface interface {

	// GetTransferFactoryWithBody performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the factory and choice context for executing a direct transfer.
	GetTransferFactoryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferFactory performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` operationId) request.
	// Takes a body of the `application/json` content type.
	//
	// Get the factory and choice context for executing a direct transfer.
	GetTransferFactory(ctx context.Context, body GetTransferFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferInstructionAcceptContextWithBody performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the choice context to accept a transfer instruction.
	GetTransferInstructionAcceptContextWithBody(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferInstructionAcceptContext performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` operationId) request.
	// Takes a body of the `application/json` content type.
	//
	// Get the choice context to accept a transfer instruction.
	GetTransferInstructionAcceptContext(ctx context.Context, transferInstructionId string, body GetTransferInstructionAcceptContextJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferInstructionRejectContextWithBody performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the choice context to reject a transfer instruction.
	GetTransferInstructionRejectContextWithBody(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferInstructionRejectContext performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` operationId) request.
	// Takes a body of the `application/json` content type.
	//
	// Get the choice context to reject a transfer instruction.
	GetTransferInstructionRejectContext(ctx context.Context, transferInstructionId string, body GetTransferInstructionRejectContextJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferInstructionWithdrawContextWithBody performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the choice context to withdraw a transfer instruction.
	GetTransferInstructionWithdrawContextWithBody(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferInstructionWithdrawContext performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` operationId) request.
	// Takes a body of the `application/json` content type.
	//
	// Get the choice context to withdraw a transfer instruction.
	GetTransferInstructionWithdrawContext(ctx context.Context, transferInstructionId string, body GetTransferInstructionWithdrawContextJSONRequestBody, 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) GetTransferFactoryWithBodyWithResponse

func (c *ClientWithResponses) GetTransferFactoryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferFactoryResp, error)

GetTransferFactoryWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` operationId) request, with any type of body and a specified content type.

Get the factory and choice context for executing a direct transfer.

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

func (*ClientWithResponses) GetTransferFactoryWithResponse

func (c *ClientWithResponses) GetTransferFactoryWithResponse(ctx context.Context, body GetTransferFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferFactoryResp, error)

GetTransferFactoryWithResponse performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` 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 factory and choice context for executing a direct transfer.

func (*ClientWithResponses) GetTransferInstructionAcceptContextWithBodyWithResponse

func (c *ClientWithResponses) GetTransferInstructionAcceptContextWithBodyWithResponse(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferInstructionAcceptContextResp, error)

GetTransferInstructionAcceptContextWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` operationId) request, with any type of body and a specified content type.

Get the choice context to accept a transfer instruction.

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

func (*ClientWithResponses) GetTransferInstructionAcceptContextWithResponse

func (c *ClientWithResponses) GetTransferInstructionAcceptContextWithResponse(ctx context.Context, transferInstructionId string, body GetTransferInstructionAcceptContextJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferInstructionAcceptContextResp, error)

GetTransferInstructionAcceptContextWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` 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 choice context to accept a transfer instruction.

func (*ClientWithResponses) GetTransferInstructionRejectContextWithBodyWithResponse

func (c *ClientWithResponses) GetTransferInstructionRejectContextWithBodyWithResponse(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferInstructionRejectContextResp, error)

GetTransferInstructionRejectContextWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` operationId) request, with any type of body and a specified content type.

Get the choice context to reject a transfer instruction.

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

func (*ClientWithResponses) GetTransferInstructionRejectContextWithResponse

func (c *ClientWithResponses) GetTransferInstructionRejectContextWithResponse(ctx context.Context, transferInstructionId string, body GetTransferInstructionRejectContextJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferInstructionRejectContextResp, error)

GetTransferInstructionRejectContextWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` 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 choice context to reject a transfer instruction.

func (*ClientWithResponses) GetTransferInstructionWithdrawContextWithBodyWithResponse

func (c *ClientWithResponses) GetTransferInstructionWithdrawContextWithBodyWithResponse(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferInstructionWithdrawContextResp, error)

GetTransferInstructionWithdrawContextWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` operationId) request, with any type of body and a specified content type.

Get the choice context to withdraw a transfer instruction.

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

func (*ClientWithResponses) GetTransferInstructionWithdrawContextWithResponse

func (c *ClientWithResponses) GetTransferInstructionWithdrawContextWithResponse(ctx context.Context, transferInstructionId string, body GetTransferInstructionWithdrawContextJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferInstructionWithdrawContextResp, error)

GetTransferInstructionWithdrawContextWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` 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 choice context to withdraw a transfer instruction.

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// GetTransferFactoryWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the factory and choice context for executing a direct transfer.
	//
	// Returns a wrapper object for the known response body format(s).
	GetTransferFactoryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferFactoryResp, error)

	// GetTransferFactoryWithResponse performs a POST /registry/transfer-instruction/v1/transfer-factory (the `GetTransferFactory` 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 factory and choice context for executing a direct transfer.
	GetTransferFactoryWithResponse(ctx context.Context, body GetTransferFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferFactoryResp, error)

	// GetTransferInstructionAcceptContextWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the choice context to accept a transfer instruction.
	//
	// Returns a wrapper object for the known response body format(s).
	GetTransferInstructionAcceptContextWithBodyWithResponse(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferInstructionAcceptContextResp, error)

	// GetTransferInstructionAcceptContextWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept (the `GetTransferInstructionAcceptContext` 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 choice context to accept a transfer instruction.
	GetTransferInstructionAcceptContextWithResponse(ctx context.Context, transferInstructionId string, body GetTransferInstructionAcceptContextJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferInstructionAcceptContextResp, error)

	// GetTransferInstructionRejectContextWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the choice context to reject a transfer instruction.
	//
	// Returns a wrapper object for the known response body format(s).
	GetTransferInstructionRejectContextWithBodyWithResponse(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferInstructionRejectContextResp, error)

	// GetTransferInstructionRejectContextWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject (the `GetTransferInstructionRejectContext` 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 choice context to reject a transfer instruction.
	GetTransferInstructionRejectContextWithResponse(ctx context.Context, transferInstructionId string, body GetTransferInstructionRejectContextJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferInstructionRejectContextResp, error)

	// GetTransferInstructionWithdrawContextWithBodyWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` operationId) request,
	// with any type of body and a specified content type.
	//
	// Get the choice context to withdraw a transfer instruction.
	//
	// Returns a wrapper object for the known response body format(s).
	GetTransferInstructionWithdrawContextWithBodyWithResponse(ctx context.Context, transferInstructionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTransferInstructionWithdrawContextResp, error)

	// GetTransferInstructionWithdrawContextWithResponse performs a POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw (the `GetTransferInstructionWithdrawContext` 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 choice context to withdraw a transfer instruction.
	GetTransferInstructionWithdrawContextWithResponse(ctx context.Context, transferInstructionId string, body GetTransferInstructionWithdrawContextJSONRequestBody, reqEditors ...RequestEditorFn) (*GetTransferInstructionWithdrawContextResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DisclosedContract

type DisclosedContract struct {
	ContractId       string `json:"contractId"`
	CreatedEventBlob string `json:"createdEventBlob"`

	// DebugCreatedAt The ledger effective time at which the contract was created.
	// Use this data only if you trust the provider, as it might not match the data in the
	// `createdEventBlob`.
	DebugCreatedAt *time.Time `json:"debugCreatedAt,omitempty"`

	// DebugPackageName The name of the Daml package that was used to create the contract.
	// Use this data only if you trust the provider, as it might not match the data in the
	// `createdEventBlob`.
	DebugPackageName *string `json:"debugPackageName,omitempty"`

	// DebugPayload The contract arguments that were used to create the contract.
	// Use this data only if you trust the provider, as it might not match the data in the
	// `createdEventBlob`.
	DebugPayload *map[string]interface{} `json:"debugPayload,omitempty"`

	// SynchronizerId The synchronizer to which the contract is currently assigned.
	// If the contract is in the process of being reassigned, then a "409" response is returned.
	SynchronizerId string `json:"synchronizerId"`
	TemplateId     string `json:"templateId"`
}

DisclosedContract defines model for DisclosedContract.

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse defines model for ErrorResponse.

type GetChoiceContextRequest

type GetChoiceContextRequest struct {
	// Meta Metadata that will be passed to the choice, and should be incorporated
	// into the choice context. Provided for extensibility.
	Meta *map[string]string `json:"meta,omitempty"`
}

GetChoiceContextRequest A request to get the context for executing a choice on a contract.

type GetFactoryRequest

type GetFactoryRequest struct {
	// ChoiceArguments The arguments that are intended to be passed to the choice provided by the factory.
	// To avoid repeating the Daml type definitions, they are specified as JSON objects.
	// However the concrete format is given by how the choice arguments are encoded using the Daml JSON API
	// (with the `extraArgs.context` and `extraArgs.meta` fields set to the empty object).
	//
	// The choice arguments are provided so that the registry can also provide choice-argument
	// specific contracts, e.g., the configuration for a specific instrument-id.
	ChoiceArguments map[string]interface{} `json:"choiceArguments"`

	// ExcludeDebugFields If set to true, the response will not include debug fields.
	ExcludeDebugFields *bool `json:"excludeDebugFields,omitempty"`
}

GetFactoryRequest defines model for GetFactoryRequest.

type GetTransferFactoryJSONRequestBody

type GetTransferFactoryJSONRequestBody = GetFactoryRequest

GetTransferFactoryJSONRequestBody defines body for GetTransferFactory for application/json ContentType.

type GetTransferFactoryResp

type GetTransferFactoryResp struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *TransferFactoryWithChoiceContext
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *N400
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *N404
}

func ParseGetTransferFactoryResp

func ParseGetTransferFactoryResp(rsp *http.Response) (*GetTransferFactoryResp, error)

ParseGetTransferFactoryResp parses an HTTP response from a GetTransferFactoryWithResponse call

func (GetTransferFactoryResp) ContentType

func (r GetTransferFactoryResp) ContentType() string

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

func (GetTransferFactoryResp) GetBody

func (r GetTransferFactoryResp) GetBody() []byte

GetBody returns the raw response body bytes

func (GetTransferFactoryResp) GetJSON200

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

func (GetTransferFactoryResp) GetJSON400

func (r GetTransferFactoryResp) GetJSON400() *N400

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

func (GetTransferFactoryResp) GetJSON404

func (r GetTransferFactoryResp) GetJSON404() *N404

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

func (GetTransferFactoryResp) Status

func (r GetTransferFactoryResp) Status() string

Status returns HTTPResponse.Status

func (GetTransferFactoryResp) StatusCode

func (r GetTransferFactoryResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransferInstructionAcceptContextJSONRequestBody

type GetTransferInstructionAcceptContextJSONRequestBody = GetChoiceContextRequest

GetTransferInstructionAcceptContextJSONRequestBody defines body for GetTransferInstructionAcceptContext for application/json ContentType.

type GetTransferInstructionAcceptContextResp

type GetTransferInstructionAcceptContextResp struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ChoiceContext
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *N400
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *N404
}

func ParseGetTransferInstructionAcceptContextResp

func ParseGetTransferInstructionAcceptContextResp(rsp *http.Response) (*GetTransferInstructionAcceptContextResp, error)

ParseGetTransferInstructionAcceptContextResp parses an HTTP response from a GetTransferInstructionAcceptContextWithResponse call

func (GetTransferInstructionAcceptContextResp) ContentType

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

func (GetTransferInstructionAcceptContextResp) GetBody

GetBody returns the raw response body bytes

func (GetTransferInstructionAcceptContextResp) GetJSON200

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

func (GetTransferInstructionAcceptContextResp) GetJSON400

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

func (GetTransferInstructionAcceptContextResp) GetJSON404

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

func (GetTransferInstructionAcceptContextResp) Status

Status returns HTTPResponse.Status

func (GetTransferInstructionAcceptContextResp) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetTransferInstructionRejectContextJSONRequestBody

type GetTransferInstructionRejectContextJSONRequestBody = GetChoiceContextRequest

GetTransferInstructionRejectContextJSONRequestBody defines body for GetTransferInstructionRejectContext for application/json ContentType.

type GetTransferInstructionRejectContextResp

type GetTransferInstructionRejectContextResp struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ChoiceContext
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *N400
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *N404
}

func ParseGetTransferInstructionRejectContextResp

func ParseGetTransferInstructionRejectContextResp(rsp *http.Response) (*GetTransferInstructionRejectContextResp, error)

ParseGetTransferInstructionRejectContextResp parses an HTTP response from a GetTransferInstructionRejectContextWithResponse call

func (GetTransferInstructionRejectContextResp) ContentType

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

func (GetTransferInstructionRejectContextResp) GetBody

GetBody returns the raw response body bytes

func (GetTransferInstructionRejectContextResp) GetJSON200

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

func (GetTransferInstructionRejectContextResp) GetJSON400

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

func (GetTransferInstructionRejectContextResp) GetJSON404

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

func (GetTransferInstructionRejectContextResp) Status

Status returns HTTPResponse.Status

func (GetTransferInstructionRejectContextResp) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetTransferInstructionWithdrawContextJSONRequestBody

type GetTransferInstructionWithdrawContextJSONRequestBody = GetChoiceContextRequest

GetTransferInstructionWithdrawContextJSONRequestBody defines body for GetTransferInstructionWithdrawContext for application/json ContentType.

type GetTransferInstructionWithdrawContextResp

type GetTransferInstructionWithdrawContextResp struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ChoiceContext
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *N400
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *N404
}

func ParseGetTransferInstructionWithdrawContextResp

func ParseGetTransferInstructionWithdrawContextResp(rsp *http.Response) (*GetTransferInstructionWithdrawContextResp, error)

ParseGetTransferInstructionWithdrawContextResp parses an HTTP response from a GetTransferInstructionWithdrawContextWithResponse call

func (GetTransferInstructionWithdrawContextResp) ContentType

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

func (GetTransferInstructionWithdrawContextResp) GetBody

GetBody returns the raw response body bytes

func (GetTransferInstructionWithdrawContextResp) GetJSON200

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

func (GetTransferInstructionWithdrawContextResp) GetJSON400

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

func (GetTransferInstructionWithdrawContextResp) GetJSON404

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

func (GetTransferInstructionWithdrawContextResp) Status

Status returns HTTPResponse.Status

func (GetTransferInstructionWithdrawContextResp) StatusCode

StatusCode returns HTTPResponse.StatusCode

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 N400

type N400 = ErrorResponse

N400 defines model for 400.

type N404

type N404 = ErrorResponse

N404 defines model for 404.

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 /registry/transfer-instruction/v1/transfer-factory)
	GetTransferFactory(c *gin.Context)

	// (POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept)
	GetTransferInstructionAcceptContext(c *gin.Context, transferInstructionId string)

	// (POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject)
	GetTransferInstructionRejectContext(c *gin.Context, transferInstructionId string)

	// (POST /registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw)
	GetTransferInstructionWithdrawContext(c *gin.Context, transferInstructionId 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) GetTransferFactory

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

GetTransferFactory operation middleware

func (*ServerInterfaceWrapper) GetTransferInstructionAcceptContext

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

GetTransferInstructionAcceptContext operation middleware

func (*ServerInterfaceWrapper) GetTransferInstructionRejectContext

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

GetTransferInstructionRejectContext operation middleware

func (*ServerInterfaceWrapper) GetTransferInstructionWithdrawContext

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

GetTransferInstructionWithdrawContext operation middleware

type TransferFactoryWithChoiceContext

type TransferFactoryWithChoiceContext struct {
	// ChoiceContext The context required to exercise a choice on a contract via an interface.
	// Used to retrieve additional reference data that is passed in via disclosed contracts,
	// which are in turn referred to via their contract ID in the `choiceContextData`.
	ChoiceContext ChoiceContext `json:"choiceContext"`

	// FactoryId The contract ID of the contract implementing the factory interface.
	FactoryId string `json:"factoryId"`

	// TransferKind The kind of transfer workflow that will be used:
	// * `offer`: offer a transfer to the receiver and only transfer if they accept
	// * `direct`: transfer directly to the receiver without asking them for approval.
	//   Only chosen if the receiver has pre-approved direct transfers.
	// * `self`: a self-transfer where the sender and receiver are the same party.
	//   No approval is required, and the transfer is typically immediate.
	TransferKind TransferFactoryWithChoiceContextTransferKind `json:"transferKind"`
}

TransferFactoryWithChoiceContext The transfer factory contract together with the choice context required to exercise the choice provided by the factory. Typically used to implement the generic initiation of on-ledger workflows via a Daml interface.

Clients SHOULD avoid reusing the same `FactoryWithChoiceContext` for exercising multiple choices, as the choice context MAY be specific to the choice being exercised.

type TransferFactoryWithChoiceContextTransferKind

type TransferFactoryWithChoiceContextTransferKind string

TransferFactoryWithChoiceContextTransferKind The kind of transfer workflow that will be used:

  • `offer`: offer a transfer to the receiver and only transfer if they accept
  • `direct`: transfer directly to the receiver without asking them for approval. Only chosen if the receiver has pre-approved direct transfers.
  • `self`: a self-transfer where the sender and receiver are the same party. No approval is required, and the transfer is typically immediate.

Defines values for TransferFactoryWithChoiceContextTransferKind.

func (TransferFactoryWithChoiceContextTransferKind) Valid

Valid indicates whether the value is a known member of the TransferFactoryWithChoiceContextTransferKind enum.

Jump to

Keyboard shortcuts

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