apitypes

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DistributionModeBroadcast   = fftypes.FFEnumValue("distmode", "broadcast")
	DistributionModeLoadBalance = fftypes.FFEnumValue("distmode", "load_balance")
)
View Source
var (
	EventStreamTypeWebhook   = fftypes.FFEnumValue("estype", "webhook")
	EventStreamTypeWebSocket = fftypes.FFEnumValue("estype", "websocket")
)
View Source
var (
	ErrorHandlingTypeBlock = fftypes.FFEnumValue("ehtype", "block")
	ErrorHandlingTypeSkip  = fftypes.FFEnumValue("ehtype", "skip")
)

Functions

func CheckUpdateBool

func CheckUpdateBool(changed bool, merged **bool, old *bool, new *bool, defValue bool) bool

CheckUpdateBool helper merges supplied configuration, with a base, and applies a default if unset

func CheckUpdateDuration

func CheckUpdateDuration(changed bool, merged **fftypes.FFDuration, old *fftypes.FFDuration, new *fftypes.FFDuration, defValue fftypes.FFDuration) bool

CheckUpdateDuration helper merges supplied configuration, with a base, and applies a default if unset

func CheckUpdateEnum

func CheckUpdateEnum(changed bool, merged **fftypes.FFEnum, old *fftypes.FFEnum, new *fftypes.FFEnum, defValue fftypes.FFEnum) bool

CheckUpdateEnum helper merges supplied configuration, with a base, and applies a default if unset

func CheckUpdateString

func CheckUpdateString(changed bool, merged **string, old *string, new *string, defValue string) bool

CheckUpdateString helper merges supplied configuration, with a base, and applies a default if unset

func CheckUpdateStringMap

func CheckUpdateStringMap(changed bool, merged *map[string]string, old map[string]string, new map[string]string) bool

CheckUpdateStringMap helper merges supplied configuration, with a base, and applies a default if unset

func CheckUpdateUint64

func CheckUpdateUint64(changed bool, merged **uint64, old *uint64, new *uint64, defValue int64) bool

CheckUpdateUint64 helper merges supplied configuration, with a base, and applies a default if unset

func NewULID

func NewULID() *fftypes.UUID

NewULID returns a Universally Unique Lexicographically Sortable Identifier (ULID). For consistency we impersonate the formatting of a UUID, so they can be used interchangeably. This can be used in database tables to ensure monotonic increasing identifiers.

Types

type BaseRequest

type BaseRequest struct {
	// contains filtered or unexported fields
}

BaseRequest is the common headers to all requests, and captures the full input payload for later decoding to a specific type

func (*BaseRequest) UnmarshalJSON

func (br *BaseRequest) UnmarshalJSON(data []byte) error

func (*BaseRequest) UnmarshalTo

func (br *BaseRequest) UnmarshalTo(o interface{}) error

type BlockInfo added in v1.2.4

type BlockInfo struct {
	BlockNumber       fftypes.FFuint64 `json:"blockNumber"`
	BlockHash         string           `json:"blockHash"`
	ParentHash        string           `json:"parentHash"`
	TransactionHashes []string         `json:"transactionHashes,omitempty"`
}

type CheckpointListeners added in v1.3.0

type CheckpointListeners map[fftypes.UUID]json.RawMessage

func (*CheckpointListeners) Scan added in v1.3.0

func (l *CheckpointListeners) Scan(val any) error

func (CheckpointListeners) Value added in v1.3.0

func (l CheckpointListeners) Value() (driver.Value, error)

type Confirmation added in v1.3.0

type Confirmation struct {
	BlockNumber fftypes.FFuint64 `json:"blockNumber"`
	BlockHash   string           `json:"blockHash"`
	ParentHash  string           `json:"parentHash"`
}

func ConfirmationFromBlock added in v1.3.0

func ConfirmationFromBlock(block *BlockInfo) *Confirmation

type ConfirmationRecord added in v1.3.0

type ConfirmationRecord struct {
	dbsql.ResourceBase        // default persistence headers for this micro object
	TransactionID      string `json:"transaction"` // owning transaction
	*Confirmation
}

type ConfirmationsNotification added in v1.3.0

type ConfirmationsNotification struct {
	// Confirmed marks we've reached the confirmation threshold
	Confirmed bool
	// NewFork is true when NewConfirmations is a complete list of confirmations.
	// Otherwise, Confirmations is an additive delta on top of a previous list of confirmations.
	NewFork bool
	// Confirmations is the list of confirmations being notified - assured to be non-nil, but might be empty.
	Confirmations []*Confirmation
}

type ContractDeployRequest

type ContractDeployRequest struct {
	Headers RequestHeaders `json:"headers"`
	ffcapi.ContractDeployPrepareRequest
}

ContractDeployRequest is the payload sent to initiate a new transaction

type DistributionMode

type DistributionMode = fftypes.FFEnum

type ErrorHandlingType

type ErrorHandlingType = fftypes.FFEnum

type EventBatch added in v0.9.12

type EventBatch struct {
	BatchNumber int64               `json:"batchNumber"`
	Events      []*EventWithContext `json:"events"`
}

type EventContext

type EventContext struct {
	StreamID       *fftypes.UUID `json:"streamId"`     // the ID of the event stream for this event
	EthCompatSubID *fftypes.UUID `json:"subId"`        // ID of the listener - EthCompat "subscription" naming
	ListenerName   string        `json:"listenerName"` // name of the listener
}

type EventStream

type EventStream struct {
	ID        *fftypes.UUID    `ffstruct:"eventstream" json:"id"`
	Created   *fftypes.FFTime  `ffstruct:"eventstream" json:"created"`
	Updated   *fftypes.FFTime  `ffstruct:"eventstream" json:"updated"`
	Name      *string          `ffstruct:"eventstream" json:"name,omitempty"`
	Suspended *bool            `ffstruct:"eventstream" json:"suspended,omitempty"`
	Type      *EventStreamType `ffstruct:"eventstream" json:"type,omitempty" ffenum:"estype"`

	ErrorHandling     *ErrorHandlingType  `ffstruct:"eventstream" json:"errorHandling"`
	BatchSize         *uint64             `ffstruct:"eventstream" json:"batchSize"`
	BatchTimeout      *fftypes.FFDuration `ffstruct:"eventstream" json:"batchTimeout"`
	RetryTimeout      *fftypes.FFDuration `ffstruct:"eventstream" json:"retryTimeout"`
	BlockedRetryDelay *fftypes.FFDuration `ffstruct:"eventstream" json:"blockedRetryDelay"`

	EthCompatBatchTimeoutMS       *uint64 `ffstruct:"eventstream" json:"batchTimeoutMS,omitempty"`       // input only, for backwards compatibility
	EthCompatRetryTimeoutSec      *uint64 `ffstruct:"eventstream" json:"retryTimeoutSec,omitempty"`      // input only, for backwards compatibility
	EthCompatBlockedRetryDelaySec *uint64 `ffstruct:"eventstream" json:"blockedRetryDelaySec,omitempty"` // input only, for backwards compatibility

	Webhook   *WebhookConfig   `ffstruct:"eventstream" json:"webhook,omitempty"`
	WebSocket *WebSocketConfig `ffstruct:"eventstream" json:"websocket,omitempty"`
}

func (*EventStream) GetID added in v1.3.0

func (es *EventStream) GetID() string

func (*EventStream) SetCreated added in v1.3.0

func (es *EventStream) SetCreated(t *fftypes.FFTime)

func (*EventStream) SetUpdated added in v1.3.0

func (es *EventStream) SetUpdated(t *fftypes.FFTime)

type EventStreamCheckpoint

type EventStreamCheckpoint struct {
	StreamID        *fftypes.UUID       `json:"streamId"`
	Time            *fftypes.FFTime     `json:"time"`            // this is the latest checkpoint time
	FirstCheckpoint *fftypes.FFTime     `json:"firstCheckpoint"` // this is the initial create time
	Listeners       CheckpointListeners `json:"listeners"`
}

func (*EventStreamCheckpoint) GetID added in v1.3.0

func (cp *EventStreamCheckpoint) GetID() string

func (*EventStreamCheckpoint) SetCreated added in v1.3.0

func (cp *EventStreamCheckpoint) SetCreated(t *fftypes.FFTime)

func (*EventStreamCheckpoint) SetUpdated added in v1.3.0

func (cp *EventStreamCheckpoint) SetUpdated(t *fftypes.FFTime)

type EventStreamStatus

type EventStreamStatus string
const (
	EventStreamStatusStarted  EventStreamStatus = "started"
	EventStreamStatusStopping EventStreamStatus = "stopping"
	EventStreamStatusStopped  EventStreamStatus = "stopped"
	EventStreamStatusDeleted  EventStreamStatus = "deleted"
)

type EventStreamType

type EventStreamType = fftypes.FFEnum

type EventStreamWithStatus

type EventStreamWithStatus struct {
	EventStream
	Status EventStreamStatus `ffstruct:"eventstream" json:"status"`
}

type EventWithContext

type EventWithContext struct {
	StandardContext EventContext
	ffcapi.Event
}

EventWithContext is what is delivered There is custom serialization to flatten the whole structure, so all the custom `info` fields from the connector are alongside the required context fields. The `data` is kept separate

func (*EventWithContext) MarshalJSON

func (e *EventWithContext) MarshalJSON() ([]byte, error)

func (*EventWithContext) UnmarshalJSON

func (e *EventWithContext) UnmarshalJSON(b []byte) error

Note on unmarshal info will be a map with all the fields (except "data")

type Listener

type Listener struct {
	ID               *fftypes.UUID    `ffstruct:"listener" json:"id,omitempty"`
	Created          *fftypes.FFTime  `ffstruct:"listener" json:"created"`
	Updated          *fftypes.FFTime  `ffstruct:"listener" json:"updated"`
	Name             *string          `ffstruct:"listener" json:"name"`
	StreamID         *fftypes.UUID    `ffstruct:"listener" json:"stream" ffexcludeoutput:"true"`
	EthCompatAddress *string          `ffstruct:"listener" json:"address,omitempty"`
	EthCompatEvent   *fftypes.JSONAny `ffstruct:"listener" json:"event,omitempty"`
	EthCompatMethods *fftypes.JSONAny `ffstruct:"listener" json:"methods,omitempty"`
	Filters          ListenerFilters  `ffstruct:"listener" json:"filters"`
	Options          *fftypes.JSONAny `ffstruct:"listener" json:"options"`
	Signature        *string          `ffstruct:"listener" json:"signature,omitempty" ffexcludeinput:"true"`
	FromBlock        *string          `ffstruct:"listener" json:"fromBlock,omitempty"`
}

func (*Listener) GetID added in v1.3.0

func (l *Listener) GetID() string

func (*Listener) SetCreated added in v1.3.0

func (l *Listener) SetCreated(t *fftypes.FFTime)

func (*Listener) SetUpdated added in v1.3.0

func (l *Listener) SetUpdated(t *fftypes.FFTime)

func (*Listener) SignatureString added in v1.3.0

func (l *Listener) SignatureString() string

type ListenerFilters added in v1.3.0

type ListenerFilters []fftypes.JSONAny

func (*ListenerFilters) Scan added in v1.3.0

func (lf *ListenerFilters) Scan(src interface{}) error

Store in DB as JSON

func (ListenerFilters) Value added in v1.3.0

func (lf ListenerFilters) Value() (driver.Value, error)

Store in DB as JSON

type ListenerWithStatus added in v0.9.6

type ListenerWithStatus struct {
	Listener
	ffcapi.EventListenerHWMResponse
}

type LiveAddressBalance added in v1.1.6

type LiveAddressBalance struct {
	ffcapi.AddressBalanceResponse
}

type LiveGasPrice added in v1.2.0

type LiveGasPrice struct {
	ffcapi.GasPriceEstimateResponse
}

type LiveStatus added in v0.9.11

type LiveStatus struct {
	ffcapi.LiveResponse
}

type ManagedTX

type ManagedTX struct {
	ID              string          `json:"id"`
	Created         *fftypes.FFTime `json:"created"`
	Updated         *fftypes.FFTime `json:"updated"`
	Status          TxStatus        `json:"status"`
	DeleteRequested *fftypes.FFTime `json:"deleteRequested,omitempty"`
	SequenceID      string          `json:"sequenceId,omitempty"`
	ffcapi.TransactionHeaders
	GasPrice                     *fftypes.JSONAny           `json:"gasPrice"`
	TransactionData              string                     `json:"transactionData"`
	TransactionHash              string                     `json:"transactionHash,omitempty"`
	PolicyInfo                   *fftypes.JSONAny           `json:"policyInfo"`
	FirstSubmit                  *fftypes.FFTime            `json:"firstSubmit,omitempty"`
	LastSubmit                   *fftypes.FFTime            `json:"lastSubmit,omitempty"`
	ErrorMessage                 string                     `json:"errorMessage,omitempty"`
	DeprecatedTransactionHeaders *ffcapi.TransactionHeaders `json:"transactionHeaders,omitempty"` // LevelDB only: for lost-in-time historical reasons we duplicate these fields at the base too on this query structure
}

ManagedTX is the structure stored for each new transaction request, using the external ID of the operation

Indexing:

Multiple index collection are stored for the managed transactions, to allow them to be managed including:

- Nonce allocation: this is a critical index, and why cleanup is so important (mentioned below).
  We use this index to determine the next nonce to assign to a given signing key.
- Created time: a timestamp ordered index for the transactions for convenient ordering.
  the key includes the ID of the TX for uniqueness.
- Pending sequence: An entry in this index only exists while the transaction is pending, and is
  ordered by a UUIDv1 sequence allocated to each entry.

Index cleanup after partial write:

  • All indexes are stored before the TX itself.
  • When listing back entries, the persistence layer will automatically clean up indexes if the underlying TX they refer to is not available. For this reason the index records are written first.

func (*ManagedTX) GetID added in v1.3.0

func (mtx *ManagedTX) GetID() string

func (*ManagedTX) Namespace added in v1.2.7

func (mtx *ManagedTX) Namespace(ctx context.Context) string

func (*ManagedTX) SetCreated added in v1.3.0

func (mtx *ManagedTX) SetCreated(t *fftypes.FFTime)

func (*ManagedTX) SetSequence added in v1.3.0

func (mtx *ManagedTX) SetSequence(i int64)

func (*ManagedTX) SetUpdated added in v1.3.0

func (mtx *ManagedTX) SetUpdated(t *fftypes.FFTime)

type ManagedTransactionEvent added in v1.2.4

type ManagedTransactionEvent struct {
	Type    ManagedTransactionEventType
	Tx      *ManagedTX
	Receipt *ffcapi.TransactionReceiptResponse
	// ReceiptHandler can be passed on the event as a closure with extra variables
	ReceiptHandler func(ctx context.Context, txID string, receipt *ffcapi.TransactionReceiptResponse) error
	// ConfirmationHandler can be passed on the event as a closure with extra variables
	ConfirmationHandler func(ctx context.Context, txID string, notification *ConfirmationsNotification) error
}

type ManagedTransactionEventType added in v1.2.4

type ManagedTransactionEventType int

ManagedTransactionEventType is a enum type that contains all types of transaction process events that a transaction handler emits.

const (
	ManagedTXProcessSucceeded ManagedTransactionEventType = iota
	ManagedTXProcessFailed
	ManagedTXDeleted
	ManagedTXTransactionHashAdded
	ManagedTXTransactionHashRemoved
)

type QueryRequest

type QueryRequest struct {
	Headers RequestHeaders `json:"headers"`
	ffcapi.TransactionInput
	BlockNumber *string `json:"blockNumber,omitempty"`
}

QueryRequest is the request payload to send to perform a synchronous query against the blockchain state

type QueryResponse

type QueryResponse ffcapi.QueryInvokeResponse

QueryResponse is the response payload for a query

type ReadyStatus added in v0.9.11

type ReadyStatus struct {
	ffcapi.ReadyResponse
}

type ReceiptRecord added in v1.3.0

type ReceiptRecord struct {
	TransactionID string          `json:"transaction"` // owning transaction
	Created       *fftypes.FFTime `json:"created"`
	Updated       *fftypes.FFTime `json:"updated"`
	*ffcapi.TransactionReceiptResponse
}

func (*ReceiptRecord) GetID added in v1.3.0

func (r *ReceiptRecord) GetID() string

func (*ReceiptRecord) SetCreated added in v1.3.0

func (r *ReceiptRecord) SetCreated(t *fftypes.FFTime)

func (*ReceiptRecord) SetUpdated added in v1.3.0

func (r *ReceiptRecord) SetUpdated(t *fftypes.FFTime)

type ReplyHeaders

type ReplyHeaders struct {
	RequestID string    `json:"requestId"`
	Type      ReplyType `json:"type"`
}

type ReplyType

type ReplyType string
const (
	TransactionUpdate        ReplyType = "TransactionUpdate"
	TransactionUpdateSuccess ReplyType = "TransactionSuccess"
	TransactionUpdateFailure ReplyType = "TransactionFailure"
)

type RequestHeaders

type RequestHeaders struct {
	ID   string      `ffstruct:"fftmrequest" json:"id"`
	Type RequestType `json:"type"`
}

type RequestType

type RequestType string
const (
	RequestTypeSendTransaction RequestType = "SendTransaction"
	RequestTypeQuery           RequestType = "Query"
	RequestTypeDeploy          RequestType = "DeployContract"
)

type TXHistoryRecord added in v1.3.0

type TXHistoryRecord struct {
	ID            *fftypes.UUID `json:"id"`          // unique identifier for this entry
	TransactionID string        `json:"transaction"` // owning transaction
	SubStatus     TxSubStatus   `json:"subStatus"`
	TxHistoryActionEntry
}

TXHistoryRecord are the sequential persisted records, which might be state transitions, or actions within the current state. Note LevelDB does not use this, as the []*TxHistoryStateTransitionEntry array is maintained directly on the large single JSON document

func (*TXHistoryRecord) GetID added in v1.3.0

func (r *TXHistoryRecord) GetID() string

func (*TXHistoryRecord) SetCreated added in v1.3.0

func (r *TXHistoryRecord) SetCreated(t *fftypes.FFTime)

func (*TXHistoryRecord) SetUpdated added in v1.3.0

func (r *TXHistoryRecord) SetUpdated(_ *fftypes.FFTime)

type TXUpdates added in v1.3.0

type TXUpdates struct {
	Status          *TxStatus         `json:"status"`
	DeleteRequested *fftypes.FFTime   `json:"deleteRequested,omitempty"`
	From            *string           `json:"from,omitempty"`
	To              *string           `json:"to,omitempty"`
	Nonce           *fftypes.FFBigInt `json:"nonce,omitempty"`
	Gas             *fftypes.FFBigInt `json:"gas,omitempty"`
	Value           *fftypes.FFBigInt `json:"value,omitempty"`
	GasPrice        *fftypes.JSONAny  `json:"gasPrice"`
	TransactionData *string           `json:"transactionData"`
	TransactionHash *string           `json:"transactionHash,omitempty"`
	PolicyInfo      *fftypes.JSONAny  `json:"policyInfo"`
	FirstSubmit     *fftypes.FFTime   `json:"firstSubmit,omitempty"`
	LastSubmit      *fftypes.FFTime   `json:"lastSubmit,omitempty"`
	ErrorMessage    *string           `json:"errorMessage,omitempty"`
}

TXUpdates specifies a set of updates that are possible on the base structure.

Any non-nil fields will be set. Sub-objects are set as a whole, apart from TransactionHeaders where each field is considered and stored individually. JSONAny fields can be set explicitly to null using fftypes.NullString

This is the update interface for the policy engine to update base status on the transaction object.

There are separate setter functions for fields that depending on the persistence mechanism might be in separate tables - including History, Receipt, and Confirmations

func (*TXUpdates) Merge added in v1.3.7

func (txu *TXUpdates) Merge(txu2 *TXUpdates)

type TXWithStatus added in v1.3.0

type TXWithStatus struct {
	*ManagedTX
	Receipt                  *ffcapi.TransactionReceiptResponse `json:"receipt,omitempty"`
	Confirmations            []*Confirmation                    `json:"confirmations,omitempty"`
	DeprecatedHistorySummary []*TxHistorySummaryEntry           `json:"historySummary,omitempty"` // LevelDB only: maintains a summary to retain data while limiting single JSON payload size
	History                  []*TxHistoryStateTransitionEntry   `json:"history,omitempty"`
}

TXWithStatus is a convenience object that fetches all data about a transaction into one large JSON payload (with limits on certain parts, such as the history entries). Note that in LevelDB persistence this is the stored form of the single document object.

type TransactionRequest

type TransactionRequest struct {
	Headers RequestHeaders `json:"headers"`
	ffcapi.TransactionInput
}

TransactionRequest is the payload sent to initiate a new transaction

type TransactionUpdateReply

type TransactionUpdateReply struct {
	Headers          ReplyHeaders     `json:"headers"`
	Status           TxStatus         `json:"status"`
	ProtocolID       string           `json:"protocolId"`
	TransactionHash  string           `json:"transactionHash,omitempty"`
	ContractLocation *fftypes.JSONAny `json:"contractLocation,omitempty"`
}

TransactionUpdateReply add a "headers" structure that allows a processor of websocket replies/updates to filter on a standard structure to know how to process the message. Extensible to update types in the future. The reply is a small summary of the latest status change. Full status for a transaction must be retrieved with /transactions/{txid}

type TxAction added in v1.2.0

type TxAction string

TxAction is an action taken while attempting to progress a transaction between sub-states

const (
	// TxActionStateTransition is a special value used for state transition entries, which are created using SetSubStatus
	TxActionStateTransition TxAction = "StateTransition"
	// TxActionAssignNonce indicates that a nonce has been assigned to the transaction
	TxActionAssignNonce TxAction = "AssignNonce"
	// TxActionRetrieveGasPrice indicates the operation is getting a gas price
	TxActionRetrieveGasPrice TxAction = "RetrieveGasPrice"
	// TxActionTimeout indicates that the transaction has timed out may need intervention to progress it
	TxActionTimeout TxAction = "Timeout"
	// TxActionSubmitTransaction indicates that the transaction has been submitted
	TxActionSubmitTransaction TxAction = "SubmitTransaction"
	// TxActionReceiveReceipt indicates that we have received a receipt for the transaction
	TxActionReceiveReceipt TxAction = "ReceiveReceipt"
	// TxActionConfirmTransaction indicates that the transaction has been confirmed
	TxActionConfirmTransaction TxAction = "Confirm"
)

type TxHistoryActionEntry added in v1.2.1

type TxHistoryActionEntry struct {
	Time            *fftypes.FFTime  `json:"time"`
	Action          TxAction         `json:"action"`
	LastOccurrence  *fftypes.FFTime  `json:"lastOccurrence,omitempty"`
	OccurrenceCount int              `json:"count"` // serialized as count for historical reasons
	LastError       *fftypes.JSONAny `json:"lastError,omitempty"`
	LastErrorTime   *fftypes.FFTime  `json:"lastErrorTime,omitempty"`
	LastInfo        *fftypes.JSONAny `json:"lastInfo,omitempty"`
}

An action taken in order to progress a transaction, e.g. retrieve gas price from an oracle. Actions are retaining similarly to the TxHistorySummaryEntry records, where we have a finite list based on the action name. Actions are only added to the list once, then updated when they occur multiple times. So if we are retrying the same set of actions over and over again the list of actions does not grow.

type TxHistoryStateTransitionEntry added in v1.2.1

type TxHistoryStateTransitionEntry struct {
	Status  TxSubStatus             `json:"subStatus"` // the subStatus we entered
	Time    *fftypes.FFTime         `json:"time"`      // the time we transitioned to this subStatus
	Actions []*TxHistoryActionEntry `json:"actions"`   // the unique actions we attempted while in this sub-status
}

TxHistoryStateTransitionEntry represents a state that the policy engine that manages transaction submission has entered, and a list of the actions attempted within that state in order to attempt to move to the next state.

type TxHistorySummaryEntry added in v1.2.1

type TxHistorySummaryEntry struct {
	Status          TxSubStatus     `json:"subStatus,omitempty"`
	Action          TxAction        `json:"action,omitempty"`
	FirstOccurrence *fftypes.FFTime `json:"firstOccurrence"`
	LastOccurrence  *fftypes.FFTime `json:"lastOccurrence"`
	Count           int             `json:"count"`
}

TxHistorySummaryEntry records summarize the transaction history, by recording the number of times each subStatus was entered. Because the detailed history might wrap, this means we can retain some basic information about the complete history of the transaction beyond the life of the individual history records.

type TxStatus

type TxStatus string

TxStatus is the current status of a transaction

const (
	// TxStatusPending indicates the operation has been submitted, but is not yet confirmed as successful or failed
	TxStatusPending TxStatus = "Pending"
	// TxStatusSucceeded the infrastructure runtime has returned success for the operation
	TxStatusSucceeded TxStatus = "Succeeded"
	// TxStatusFailed happens when an error is reported by the infrastructure runtime
	TxStatusFailed TxStatus = "Failed"
	// TxStatusSuspended indicates we are not actively doing any work with this transaction right now, until it's resumed to pending again
	TxStatusSuspended TxStatus = "Suspended"
)

type TxSubStatus added in v1.2.0

type TxSubStatus string

TxSubStatus is an intermediate status a transaction may go through

const (
	// TxSubStatusReceived indicates the transaction has been received by the connector
	TxSubStatusReceived TxSubStatus = "Received"
	// TxSubStatusStale indicates the transaction is now in stale
	TxSubStatusStale TxSubStatus = "Stale"
	// TxSubStatusTracking indicates we are tracking progress of the transaction
	TxSubStatusTracking TxSubStatus = "Tracking"
	// TxSubStatusConfirmed indicates we have confirmed that the transaction has been fully processed
	TxSubStatusConfirmed TxSubStatus = "Confirmed"
	// TxSubStatusFailed indicates we have failed to process the transaction and it will no longer be tracked
	TxSubStatusFailed TxSubStatus = "Failed"
)

type WebSocketConfig

type WebSocketConfig struct {
	DistributionMode *DistributionMode `ffstruct:"wsconfig" json:"distributionMode,omitempty"`
}

func (*WebSocketConfig) Scan added in v1.3.0

func (wc *WebSocketConfig) Scan(src interface{}) error

Store in DB as JSON

func (*WebSocketConfig) Value added in v1.3.0

func (wc *WebSocketConfig) Value() (driver.Value, error)

Store in DB as JSON

type WebhookConfig

type WebhookConfig struct {
	URL                        *string             `ffstruct:"whconfig" json:"url,omitempty"`
	Headers                    map[string]string   `ffstruct:"whconfig" json:"headers,omitempty"`
	TLSkipHostVerify           *bool               `ffstruct:"whconfig" json:"tlsSkipHostVerify,omitempty"`
	RequestTimeout             *fftypes.FFDuration `ffstruct:"whconfig" json:"requestTimeout,omitempty"`
	EthCompatRequestTimeoutSec *int64              `ffstruct:"whconfig" json:"requestTimeoutSec,omitempty"` // input only, for backwards compatibility
}

func (*WebhookConfig) Scan added in v1.3.0

func (wc *WebhookConfig) Scan(src interface{}) error

Store in DB as JSON

func (*WebhookConfig) Value added in v1.3.0

func (wc *WebhookConfig) Value() (driver.Value, error)

Store in DB as JSON

Jump to

Keyboard shortcuts

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