client

package
v0.0.0-...-dd16f27 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigurationCoordinatorAPIPath

func ConfigurationCoordinatorAPIPath() string

ConfigurationCoordinatorAPIPath returns the URL path to the CoordinatorAPI service configuration HTTP endpoint.

func DecodeConfigurationResponse

func DecodeConfigurationResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeConfigurationResponse returns a decoder for responses returned by the CoordinatorAPI configuration endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeConfigurationResponse may return the following errors:

  • "validation_error" (type *coordinatorapi.CoordinatorValidationErrorResponse): http.StatusExpectationFailed
  • "not_found" (type *goa.ServiceError): http.StatusNotFound
  • "internal" (type *goa.ServiceError): http.StatusInternalServerError
  • error: internal error

func DecodeRequestTransactionResponse

func DecodeRequestTransactionResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeRequestTransactionResponse returns a decoder for responses returned by the CoordinatorAPI request_transaction endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeRequestTransactionResponse may return the following errors:

  • "validation_error" (type *coordinatorapi.CoordinatorValidationErrorResponse): http.StatusExpectationFailed
  • "not_found" (type *goa.ServiceError): http.StatusNotFound
  • "internal" (type *goa.ServiceError): http.StatusInternalServerError
  • error: internal error

func DecodeSoftCancelsResponse

func DecodeSoftCancelsResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeSoftCancelsResponse returns a decoder for responses returned by the CoordinatorAPI soft_cancels endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeSoftCancelsResponse may return the following errors:

  • "validation_error" (type *coordinatorapi.CoordinatorValidationErrorResponse): http.StatusExpectationFailed
  • "not_found" (type *goa.ServiceError): http.StatusNotFound
  • "internal" (type *goa.ServiceError): http.StatusInternalServerError
  • error: internal error

func EncodeConfigurationRequest

func EncodeConfigurationRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeConfigurationRequest returns an encoder for requests sent to the CoordinatorAPI configuration server.

func EncodeRequestTransactionRequest

func EncodeRequestTransactionRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeRequestTransactionRequest returns an encoder for requests sent to the CoordinatorAPI request_transaction server.

func EncodeSoftCancelsRequest

func EncodeSoftCancelsRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeSoftCancelsRequest returns an encoder for requests sent to the CoordinatorAPI soft_cancels server.

func NewConfigurationInternal

func NewConfigurationInternal(body *ConfigurationInternalResponseBody) *goa.ServiceError

NewConfigurationInternal builds a CoordinatorAPI service configuration endpoint internal error.

func NewConfigurationNotFound

func NewConfigurationNotFound(body *ConfigurationNotFoundResponseBody) *goa.ServiceError

NewConfigurationNotFound builds a CoordinatorAPI service configuration endpoint not_found error.

func NewConfigurationResultOK

func NewConfigurationResultOK(body *ConfigurationResponseBody) *coordinatorapi.ConfigurationResult

NewConfigurationResultOK builds a "CoordinatorAPI" service "configuration" endpoint result from a HTTP "OK" response.

func NewConfigurationValidationError

NewConfigurationValidationError builds a CoordinatorAPI service configuration endpoint validation_error error.

func NewRequestTransactionInternal

func NewRequestTransactionInternal(body *RequestTransactionInternalResponseBody) *goa.ServiceError

NewRequestTransactionInternal builds a CoordinatorAPI service request_transaction endpoint internal error.

func NewRequestTransactionNotFound

func NewRequestTransactionNotFound(body *RequestTransactionNotFoundResponseBody) *goa.ServiceError

NewRequestTransactionNotFound builds a CoordinatorAPI service request_transaction endpoint not_found error.

func NewRequestTransactionResultOK

func NewRequestTransactionResultOK(body *RequestTransactionResponseBody) *coordinatorapi.RequestTransactionResult

NewRequestTransactionResultOK builds a "CoordinatorAPI" service "request_transaction" endpoint result from a HTTP "OK" response.

func NewRequestTransactionValidationError

NewRequestTransactionValidationError builds a CoordinatorAPI service request_transaction endpoint validation_error error.

func NewSoftCancelsInternal

func NewSoftCancelsInternal(body *SoftCancelsInternalResponseBody) *goa.ServiceError

NewSoftCancelsInternal builds a CoordinatorAPI service soft_cancels endpoint internal error.

func NewSoftCancelsNotFound

func NewSoftCancelsNotFound(body *SoftCancelsNotFoundResponseBody) *goa.ServiceError

NewSoftCancelsNotFound builds a CoordinatorAPI service soft_cancels endpoint not_found error.

func NewSoftCancelsResultOK

func NewSoftCancelsResultOK(body *SoftCancelsResponseBody) *coordinatorapi.SoftCancelsResult

NewSoftCancelsResultOK builds a "CoordinatorAPI" service "soft_cancels" endpoint result from a HTTP "OK" response.

func NewSoftCancelsValidationError

NewSoftCancelsValidationError builds a CoordinatorAPI service soft_cancels endpoint validation_error error.

func RequestTransactionCoordinatorAPIPath

func RequestTransactionCoordinatorAPIPath() string

RequestTransactionCoordinatorAPIPath returns the URL path to the CoordinatorAPI service request_transaction HTTP endpoint.

func SoftCancelsCoordinatorAPIPath

func SoftCancelsCoordinatorAPIPath() string

SoftCancelsCoordinatorAPIPath returns the URL path to the CoordinatorAPI service soft_cancels HTTP endpoint.

func ValidateConfigurationInternalResponseBody

func ValidateConfigurationInternalResponseBody(body *ConfigurationInternalResponseBody) (err error)

ValidateConfigurationInternalResponseBody runs the validations defined on configuration_internal_response_body

func ValidateConfigurationNotFoundResponseBody

func ValidateConfigurationNotFoundResponseBody(body *ConfigurationNotFoundResponseBody) (err error)

ValidateConfigurationNotFoundResponseBody runs the validations defined on configuration_not_found_response_body

func ValidateConfigurationResponseBody

func ValidateConfigurationResponseBody(body *ConfigurationResponseBody) (err error)

ValidateConfigurationResponseBody runs the validations defined on ConfigurationResponseBody

func ValidateConfigurationValidationErrorResponseBody

func ValidateConfigurationValidationErrorResponseBody(body *ConfigurationValidationErrorResponseBody) (err error)

ValidateConfigurationValidationErrorResponseBody runs the validations defined on configuration_validation_error_response_body

func ValidateCoordinatorValidationErrorResponseBody

func ValidateCoordinatorValidationErrorResponseBody(body *CoordinatorValidationErrorResponseBody) (err error)

ValidateCoordinatorValidationErrorResponseBody runs the validations defined on CoordinatorValidationErrorResponseBody

func ValidateExchangeDomainRequestBody

func ValidateExchangeDomainRequestBody(body *ExchangeDomainRequestBody) (err error)

ValidateExchangeDomainRequestBody runs the validations defined on ExchangeDomainRequestBody

func ValidateFillSignaturesResponseBody

func ValidateFillSignaturesResponseBody(body *FillSignaturesResponseBody) (err error)

ValidateFillSignaturesResponseBody runs the validations defined on FillSignaturesResponseBody

func ValidateRequestTransactionInternalResponseBody

func ValidateRequestTransactionInternalResponseBody(body *RequestTransactionInternalResponseBody) (err error)

ValidateRequestTransactionInternalResponseBody runs the validations defined on request_transaction_internal_response_body

func ValidateRequestTransactionNotFoundResponseBody

func ValidateRequestTransactionNotFoundResponseBody(body *RequestTransactionNotFoundResponseBody) (err error)

ValidateRequestTransactionNotFoundResponseBody runs the validations defined on request_transaction_not_found_response_body

func ValidateRequestTransactionResponseBody

func ValidateRequestTransactionResponseBody(body *RequestTransactionResponseBody) (err error)

ValidateRequestTransactionResponseBody runs the validations defined on request_transaction_response_body

func ValidateRequestTransactionValidationErrorResponseBody

func ValidateRequestTransactionValidationErrorResponseBody(body *RequestTransactionValidationErrorResponseBody) (err error)

ValidateRequestTransactionValidationErrorResponseBody runs the validations defined on request_transaction_validation_error_response_body

func ValidateSignedTransactionRequestBody

func ValidateSignedTransactionRequestBody(body *SignedTransactionRequestBody) (err error)

ValidateSignedTransactionRequestBody runs the validations defined on SignedTransactionRequestBody

func ValidateSoftCancelsInternalResponseBody

func ValidateSoftCancelsInternalResponseBody(body *SoftCancelsInternalResponseBody) (err error)

ValidateSoftCancelsInternalResponseBody runs the validations defined on soft_cancels_internal_response_body

func ValidateSoftCancelsNotFoundResponseBody

func ValidateSoftCancelsNotFoundResponseBody(body *SoftCancelsNotFoundResponseBody) (err error)

ValidateSoftCancelsNotFoundResponseBody runs the validations defined on soft_cancels_not_found_response_body

func ValidateSoftCancelsResponseBody

func ValidateSoftCancelsResponseBody(body *SoftCancelsResponseBody) (err error)

ValidateSoftCancelsResponseBody runs the validations defined on soft_cancels_response_body

func ValidateSoftCancelsValidationErrorResponseBody

func ValidateSoftCancelsValidationErrorResponseBody(body *SoftCancelsValidationErrorResponseBody) (err error)

ValidateSoftCancelsValidationErrorResponseBody runs the validations defined on soft_cancels_validation_error_response_body

Types

type Client

type Client struct {
	// Configuration Doer is the HTTP client used to make requests to the
	// configuration endpoint.
	ConfigurationDoer goahttp.Doer

	// RequestTransaction Doer is the HTTP client used to make requests to the
	// request_transaction endpoint.
	RequestTransactionDoer goahttp.Doer

	// SoftCancels Doer is the HTTP client used to make requests to the
	// soft_cancels endpoint.
	SoftCancelsDoer goahttp.Doer

	// CORS Doer is the HTTP client used to make requests to the  endpoint.
	CORSDoer goahttp.Doer

	// RestoreResponseBody controls whether the response bodies are reset after
	// decoding so they can be read again.
	RestoreResponseBody bool
	// contains filtered or unexported fields
}

Client lists the CoordinatorAPI service endpoint HTTP clients.

func NewClient

func NewClient(
	scheme string,
	host string,
	doer goahttp.Doer,
	enc func(*http.Request) goahttp.Encoder,
	dec func(*http.Response) goahttp.Decoder,
	restoreBody bool,
) *Client

NewClient instantiates HTTP clients for all the CoordinatorAPI service servers.

func (*Client) BuildConfigurationRequest

func (c *Client) BuildConfigurationRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildConfigurationRequest instantiates a HTTP request object with method and path set to call the "CoordinatorAPI" service "configuration" endpoint

func (*Client) BuildRequestTransactionRequest

func (c *Client) BuildRequestTransactionRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildRequestTransactionRequest instantiates a HTTP request object with method and path set to call the "CoordinatorAPI" service "request_transaction" endpoint

func (*Client) BuildSoftCancelsRequest

func (c *Client) BuildSoftCancelsRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildSoftCancelsRequest instantiates a HTTP request object with method and path set to call the "CoordinatorAPI" service "soft_cancels" endpoint

func (*Client) Configuration

func (c *Client) Configuration() goa.Endpoint

Configuration returns an endpoint that makes HTTP requests to the CoordinatorAPI service configuration server.

func (*Client) RequestTransaction

func (c *Client) RequestTransaction() goa.Endpoint

RequestTransaction returns an endpoint that makes HTTP requests to the CoordinatorAPI service request_transaction server.

func (*Client) SoftCancels

func (c *Client) SoftCancels() goa.Endpoint

SoftCancels returns an endpoint that makes HTTP requests to the CoordinatorAPI service soft_cancels server.

type ConfigurationInternalResponseBody

type ConfigurationInternalResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

ConfigurationInternalResponseBody is the type of the "CoordinatorAPI" service "configuration" endpoint HTTP response body for the "internal" error.

type ConfigurationNotFoundResponseBody

type ConfigurationNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

ConfigurationNotFoundResponseBody is the type of the "CoordinatorAPI" service "configuration" endpoint HTTP response body for the "not_found" error.

type ConfigurationResponseBody

type ConfigurationResponseBody struct {
	// Duration of validity of coordinator approval in seconds
	ExpirationDurationSeconds *uint32 `` /* 127-byte string literal not displayed */
	// Duration of selective delay in milliseconds
	SelectiveDelayMs *uint32 `form:"selectiveDelayMs,omitempty" json:"selectiveDelayMs,omitempty" xml:"selectiveDelayMs,omitempty"`
	// Supported Ethereum chain IDs
	SupportedChainIds []uint32 `form:"supportedChainIds,omitempty" json:"supportedChainIds,omitempty" xml:"supportedChainIds,omitempty"`
}

ConfigurationResponseBody is the type of the "CoordinatorAPI" service "configuration" endpoint HTTP response body.

type ConfigurationValidationErrorResponseBody

type ConfigurationValidationErrorResponseBody struct {
	// General error code
	Code *int `form:"code,omitempty" json:"code,omitempty" xml:"code,omitempty"`
	// Error reason description
	Reason *string `form:"reason,omitempty" json:"reason,omitempty" xml:"reason,omitempty"`
	// A list of explained validation errors.
	ValidationErrors []*CoordinatorValidationErrorResponseBody `form:"validationErrors,omitempty" json:"validationErrors,omitempty" xml:"validationErrors,omitempty"`
}

ConfigurationValidationErrorResponseBody is the type of the "CoordinatorAPI" service "configuration" endpoint HTTP response body for the "validation_error" error.

type CoordinatorValidationErrorResponseBody

type CoordinatorValidationErrorResponseBody struct {
	// Validation error code
	Code *int `form:"code,omitempty" json:"code,omitempty" xml:"code,omitempty"`
	// Validation error reason description
	Reason *string `form:"reason,omitempty" json:"reason,omitempty" xml:"reason,omitempty"`
	// Field name
	Field *string `form:"field,omitempty" json:"field,omitempty" xml:"field,omitempty"`
}

CoordinatorValidationErrorResponseBody is used to define fields on response body types.

type ExchangeDomainRequestBody

type ExchangeDomainRequestBody struct {
	// Address of the Injective Coordinator Contract.
	VerifyingContract string `form:"verifyingContract" json:"verifyingContract" xml:"verifyingContract"`
	// Ethereum Chain ID of the transaction
	ChainID string `form:"chainId" json:"chainId" xml:"chainId"`
}

ExchangeDomainRequestBody is used to define fields on request body types.

type FillSignaturesResponseBody

type FillSignaturesResponseBody struct {
	// EIP712 hash of order (see LibOrder.getTypedDataHash)
	OrderHash *string `form:"orderHash,omitempty" json:"orderHash,omitempty" xml:"orderHash,omitempty"`
	// Array of signatures that correspond to the required signatures to execute
	// each order in the transaction
	ApprovalSignatures []string `form:"approvalSignatures,omitempty" json:"approvalSignatures,omitempty" xml:"approvalSignatures,omitempty"`
	// Timestamp in seconds at which approval expires
	ExpirationTimeSeconds *string `form:"expirationTimeSeconds,omitempty" json:"expirationTimeSeconds,omitempty" xml:"expirationTimeSeconds,omitempty"`
	// Desired amount of takerAsset to sell
	TakerAssetFillAmount *string `form:"takerAssetFillAmount,omitempty" json:"takerAssetFillAmount,omitempty" xml:"takerAssetFillAmount,omitempty"`
}

FillSignaturesResponseBody is used to define fields on response body types.

type RequestTransactionInternalResponseBody

type RequestTransactionInternalResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

RequestTransactionInternalResponseBody is the type of the "CoordinatorAPI" service "request_transaction" endpoint HTTP response body for the "internal" error.

type RequestTransactionNotFoundResponseBody

type RequestTransactionNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

RequestTransactionNotFoundResponseBody is the type of the "CoordinatorAPI" service "request_transaction" endpoint HTTP response body for the "not_found" error.

type RequestTransactionRequestBody

type RequestTransactionRequestBody struct {
	// Signed 0x Transaction
	SignedTransaction *SignedTransactionRequestBody `form:"signedTransaction" json:"signedTransaction" xml:"signedTransaction"`
	// Address of Ethereum transaction signer that is allowed to execute this 0x
	// transaction
	TxOrigin string `form:"txOrigin" json:"txOrigin" xml:"txOrigin"`
}

RequestTransactionRequestBody is the type of the "CoordinatorAPI" service "request_transaction" endpoint HTTP request body.

func NewRequestTransactionRequestBody

func NewRequestTransactionRequestBody(p *coordinatorapi.RequestTransactionPayload) *RequestTransactionRequestBody

NewRequestTransactionRequestBody builds the HTTP request body from the payload of the "request_transaction" endpoint of the "CoordinatorAPI" service.

type RequestTransactionResponseBody

type RequestTransactionResponseBody struct {
	// when the signatures will expire and no longer be valid
	ExpirationTimeSeconds *string `form:"expirationTimeSeconds,omitempty" json:"expirationTimeSeconds,omitempty" xml:"expirationTimeSeconds,omitempty"`
	// the Coordinator signatures required to submit the 0x transaction
	Signatures []string `form:"signatures,omitempty" json:"signatures,omitempty" xml:"signatures,omitempty"`
	// Information about the outstanding signatures to fill the order(s) that have
	// been soft-cancelled.
	OutstandingFillSignatures []*FillSignaturesResponseBody `` /* 127-byte string literal not displayed */
	// An approval signature of the cancellation 0x transaction submitted to the
	// Coordinator (with the expiration hard-coded to 0 -- although these never
	// expire). These signatures can be used to prove that a soft-cancel was
	// granted for these order(s).
	CancellationSignatures []string `form:"cancellationSignatures,omitempty" json:"cancellationSignatures,omitempty" xml:"cancellationSignatures,omitempty"`
}

RequestTransactionResponseBody is the type of the "CoordinatorAPI" service "request_transaction" endpoint HTTP response body.

type RequestTransactionValidationErrorResponseBody

type RequestTransactionValidationErrorResponseBody struct {
	// General error code
	Code *int `form:"code,omitempty" json:"code,omitempty" xml:"code,omitempty"`
	// Error reason description
	Reason *string `form:"reason,omitempty" json:"reason,omitempty" xml:"reason,omitempty"`
	// A list of explained validation errors.
	ValidationErrors []*CoordinatorValidationErrorResponseBody `form:"validationErrors,omitempty" json:"validationErrors,omitempty" xml:"validationErrors,omitempty"`
}

RequestTransactionValidationErrorResponseBody is the type of the "CoordinatorAPI" service "request_transaction" endpoint HTTP response body for the "validation_error" error.

type SignedTransactionRequestBody

type SignedTransactionRequestBody struct {
	// Arbitrary number to facilitate uniqueness of the transactions's hash.
	Salt string `form:"salt" json:"salt" xml:"salt"`
	// Address of transaction signer
	SignerAddress string `form:"signerAddress" json:"signerAddress" xml:"signerAddress"`
	// The calldata that is to be executed. This must call an Exchange contract
	// method.
	Data string `form:"data" json:"data" xml:"data"`
	// Timestamp in seconds at which transaction expires.
	ExpirationTimeSeconds string `form:"expirationTimeSeconds" json:"expirationTimeSeconds" xml:"expirationTimeSeconds"`
	// gasPrice that transaction is required to be executed with.
	GasPrice string `form:"gasPrice" json:"gasPrice" xml:"gasPrice"`
	// Exchange Domain specific values.
	Domain *ExchangeDomainRequestBody `form:"domain" json:"domain" xml:"domain"`
	// Signature of the 0x Transaction
	Signature string `form:"signature" json:"signature" xml:"signature"`
}

SignedTransactionRequestBody is used to define fields on request body types.

type SoftCancelsInternalResponseBody

type SoftCancelsInternalResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

SoftCancelsInternalResponseBody is the type of the "CoordinatorAPI" service "soft_cancels" endpoint HTTP response body for the "internal" error.

type SoftCancelsNotFoundResponseBody

type SoftCancelsNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

SoftCancelsNotFoundResponseBody is the type of the "CoordinatorAPI" service "soft_cancels" endpoint HTTP response body for the "not_found" error.

type SoftCancelsRequestBody

type SoftCancelsRequestBody struct {
	// The hashes of orders to be checked whether they can be soft-cancelled
	OrderHashes []string `form:"orderHashes" json:"orderHashes" xml:"orderHashes"`
}

SoftCancelsRequestBody is the type of the "CoordinatorAPI" service "soft_cancels" endpoint HTTP request body.

func NewSoftCancelsRequestBody

func NewSoftCancelsRequestBody(p *coordinatorapi.SoftCancelsPayload) *SoftCancelsRequestBody

NewSoftCancelsRequestBody builds the HTTP request body from the payload of the "soft_cancels" endpoint of the "CoordinatorAPI" service.

type SoftCancelsResponseBody

type SoftCancelsResponseBody struct {
	// The subset of orders that have been soft-cancelled
	OrderHashes []string `form:"orderHashes,omitempty" json:"orderHashes,omitempty" xml:"orderHashes,omitempty"`
}

SoftCancelsResponseBody is the type of the "CoordinatorAPI" service "soft_cancels" endpoint HTTP response body.

type SoftCancelsValidationErrorResponseBody

type SoftCancelsValidationErrorResponseBody struct {
	// General error code
	Code *int `form:"code,omitempty" json:"code,omitempty" xml:"code,omitempty"`
	// Error reason description
	Reason *string `form:"reason,omitempty" json:"reason,omitempty" xml:"reason,omitempty"`
	// A list of explained validation errors.
	ValidationErrors []*CoordinatorValidationErrorResponseBody `form:"validationErrors,omitempty" json:"validationErrors,omitempty" xml:"validationErrors,omitempty"`
}

SoftCancelsValidationErrorResponseBody is the type of the "CoordinatorAPI" service "soft_cancels" endpoint HTTP response body for the "validation_error" error.

Jump to

Keyboard shortcuts

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