Documentation ¶
Index ¶
- func AcquireAdvisoryLock(ctx context.Context, dbConnectionPool db.DBConnectionPool, lockKey int) (bool, error)
- type DefaultPrivateKeyEncrypter
- type HorizonErrorWrapper
- func (e *HorizonErrorWrapper) Error() string
- func (e *HorizonErrorWrapper) HasResultCodes() bool
- func (e *HorizonErrorWrapper) IsBadAuthentication() bool
- func (e *HorizonErrorWrapper) IsDestinationAccountNotAuthorized() bool
- func (e *HorizonErrorWrapper) IsDestinationAccountNotReady() bool
- func (e *HorizonErrorWrapper) IsDestinationNoTrustline() bool
- func (e *HorizonErrorWrapper) IsGatewayTimeout() bool
- func (e *HorizonErrorWrapper) IsHorizonError() bool
- func (e *HorizonErrorWrapper) IsLineFull() bool
- func (e *HorizonErrorWrapper) IsNoDestinationAccount() bool
- func (e *HorizonErrorWrapper) IsNoIssuer() bool
- func (e *HorizonErrorWrapper) IsNoSourceAccount() bool
- func (e *HorizonErrorWrapper) IsNotEnoughLumens() bool
- func (e *HorizonErrorWrapper) IsNotFound() bool
- func (e *HorizonErrorWrapper) IsRateLimit() bool
- func (e *HorizonErrorWrapper) IsSourceAccountNotAuthorized() bool
- func (e *HorizonErrorWrapper) IsSourceAccountNotReady() bool
- func (e *HorizonErrorWrapper) IsSourceNoTrustline() bool
- func (e *HorizonErrorWrapper) IsTxInsufficientFee() bool
- func (e *HorizonErrorWrapper) ShouldMarkAsError() bool
- func (e *HorizonErrorWrapper) Unwrap() error
- type PrivateKeyEncrypter
- type PrivateKeyEncrypterMock
- type TransactionStatusUpdateError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireAdvisoryLock ¶
func AcquireAdvisoryLock(ctx context.Context, dbConnectionPool db.DBConnectionPool, lockKey int) (bool, error)
AcquireAdvisoryLock attempt to acquire an advisory lock on the provided lockKey, returns true if acquired, or false not.
Types ¶
type DefaultPrivateKeyEncrypter ¶
type DefaultPrivateKeyEncrypter struct{}
type HorizonErrorWrapper ¶
type HorizonErrorWrapper struct { StatusCode int Problem problem.P Err error ResultCodes *horizon.TransactionResultCodes }
HorizonErrorWrapper is an error that occurs when a horizon response is not successful.
func NewHorizonErrorWrapper ¶
func NewHorizonErrorWrapper(err error) *HorizonErrorWrapper
func (*HorizonErrorWrapper) Error ¶
func (e *HorizonErrorWrapper) Error() string
func (*HorizonErrorWrapper) HasResultCodes ¶
func (e *HorizonErrorWrapper) HasResultCodes() bool
func (*HorizonErrorWrapper) IsBadAuthentication ¶
func (e *HorizonErrorWrapper) IsBadAuthentication() bool
IsBadAuthentication verifies if the Horizon Error is related to invalid transaction or operation signatures.
func (*HorizonErrorWrapper) IsDestinationAccountNotAuthorized ¶
func (e *HorizonErrorWrapper) IsDestinationAccountNotAuthorized() bool
IsDestinationAccountNotAuthorized verifies if the Horizon Error is related to the destination account is not being authorized by the asset issuer to receive the asset.
func (*HorizonErrorWrapper) IsDestinationAccountNotReady ¶
func (e *HorizonErrorWrapper) IsDestinationAccountNotReady() bool
IsDestinationAccountNotReady verifies if the Horizon Error is related to the destination account of the transaction. It gathers all errors that would happen in a transaction because of a misconfiguration of the destination account.
func (*HorizonErrorWrapper) IsDestinationNoTrustline ¶
func (e *HorizonErrorWrapper) IsDestinationNoTrustline() bool
IsNoTrustline verifies if the Horizon Error is related to the destination account not having a trustline for the asset being sent.
func (*HorizonErrorWrapper) IsGatewayTimeout ¶
func (e *HorizonErrorWrapper) IsGatewayTimeout() bool
func (*HorizonErrorWrapper) IsHorizonError ¶
func (e *HorizonErrorWrapper) IsHorizonError() bool
func (*HorizonErrorWrapper) IsLineFull ¶
func (e *HorizonErrorWrapper) IsLineFull() bool
IsLineFull verifies if the Horizon Error is related to the destination account not having sufficient limits to receive the payment amount and still satisfy its buying liabilities.
func (*HorizonErrorWrapper) IsNoDestinationAccount ¶
func (e *HorizonErrorWrapper) IsNoDestinationAccount() bool
IsNoDestinationAccount verifies if the Horizon Error is related to the destination account not existing.
func (*HorizonErrorWrapper) IsNoIssuer ¶
func (e *HorizonErrorWrapper) IsNoIssuer() bool
IsNoIssuer verifies if the Horizon Error is related to the issuer of the asset not existing.
func (*HorizonErrorWrapper) IsNoSourceAccount ¶
func (e *HorizonErrorWrapper) IsNoSourceAccount() bool
IsNoSourceAccount verifies if the Horizon Error is related to the source account not being found.
func (*HorizonErrorWrapper) IsNotEnoughLumens ¶
func (e *HorizonErrorWrapper) IsNotEnoughLumens() bool
IsNotEnoughLumens verifies if the Horizon Error is related to the transaction attempting to bring the source account lumens balance below the minimum reserve.
func (*HorizonErrorWrapper) IsNotFound ¶
func (e *HorizonErrorWrapper) IsNotFound() bool
func (*HorizonErrorWrapper) IsRateLimit ¶
func (e *HorizonErrorWrapper) IsRateLimit() bool
func (*HorizonErrorWrapper) IsSourceAccountNotAuthorized ¶
func (e *HorizonErrorWrapper) IsSourceAccountNotAuthorized() bool
IsSourceNotAuthorized verifies if the Horizon Error is related to the source account not having authorization from the asset issuer to send the asset.
func (*HorizonErrorWrapper) IsSourceAccountNotReady ¶
func (e *HorizonErrorWrapper) IsSourceAccountNotReady() bool
IsSourceAccountNotReady verifies if the Horizon Error is related to the source account of the transaction. It gathers all errors that would happen in a transaction because of a misconfiguration of the source account.
func (*HorizonErrorWrapper) IsSourceNoTrustline ¶
func (e *HorizonErrorWrapper) IsSourceNoTrustline() bool
IsSourceNoTrustline verifies if the Horizon Error is related to the source account not having a trustline for the asset being sent.
func (*HorizonErrorWrapper) IsTxInsufficientFee ¶
func (e *HorizonErrorWrapper) IsTxInsufficientFee() bool
IsTxInsufficientFee verifies if the Horizon Error is related to the fee submitted being too small to be accepted by to the ledger by the network.
func (*HorizonErrorWrapper) ShouldMarkAsError ¶
func (e *HorizonErrorWrapper) ShouldMarkAsError() bool
ShouldMarkAsError determines whether a transaction neeeds to be marked as an error based on the transaction error code or failed op code so that TSS can determine whether it needs to be retried.
func (*HorizonErrorWrapper) Unwrap ¶
func (e *HorizonErrorWrapper) Unwrap() error
type PrivateKeyEncrypter ¶
type PrivateKeyEncrypterMock ¶
type TransactionStatusUpdateError ¶
type TransactionStatusUpdateError struct { Status string TxID string ForRetry bool // Err is the underlying error that caused the transaction status update to fail. Err error }
TransactionStatusUpdateError is an error that occurs when failing to update a transaction's status.
func NewTransactionStatusUpdateError ¶
func NewTransactionStatusUpdateError(status, txID string, forRetry bool, err error) *TransactionStatusUpdateError
func (*TransactionStatusUpdateError) Error ¶
func (e *TransactionStatusUpdateError) Error() string
func (*TransactionStatusUpdateError) Unwrap ¶
func (e *TransactionStatusUpdateError) Unwrap() error