Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountEvents ¶
AccountEvents represents a mapping of account addresses to their associated events.
func NewAccountEvents ¶
func NewAccountEvents(accountEvents map[string]flow.EventsList) AccountEvents
NewAccountEvents creates account events by converting each flow.EventsList to the corresponding models.Events.
type AccountStatusesResponse ¶
type AccountStatusesResponse struct { BlockID string `json:"block_id"` Height string `json:"height"` AccountEvents AccountEvents `json:"account_events"` MessageIndex uint64 `json:"message_index"` }
AccountStatusesResponse is the response message for 'events' topic.
func NewAccountStatusesResponse ¶
func NewAccountStatusesResponse(accountStatusesResponse *backend.AccountStatusesResponse, index uint64) *AccountStatusesResponse
type BaseDataProvidersResponse ¶
type BaseDataProvidersResponse struct { SubscriptionID string `json:"subscription_id"` // Unique subscriptionID Topic string `json:"topic"` // Topic of the subscription Payload interface{} `json:"payload"` // Payload that's being returned within a subscription. }
BaseDataProvidersResponse represents a base structure for responses from subscriptions.
type BlockDigest ¶
type BlockDigest struct { BlockId string `json:"block_id"` Height string `json:"height"` Timestamp time.Time `json:"timestamp"` }
BlockDigest is a lightweight block information model.
func NewBlockDigest ¶
func NewBlockDigest(block *flow.BlockDigest) *BlockDigest
NewBlockDigest creates a block digest instance with data from the provided flow.BlockDigest.
type BlockDigestMessageResponse ¶
type BlockDigestMessageResponse struct { // The sealed or finalized block digest according to the block status // in the request. Block *BlockDigest `json:"block_digest"` }
BlockDigestMessageResponse is the response message for 'block_digests' topic.
type BlockHeaderMessageResponse ¶
type BlockHeaderMessageResponse struct { // The sealed or finalized block headers according to the block status // in the request. Header *models.BlockHeader `json:"header"` }
BlockHeaderMessageResponse is the response message for 'block_headers' topic.
type BlockMessageResponse ¶
type BlockMessageResponse struct { // The sealed or finalized blocks according to the block status // in the request. Block *models.Block `json:"block"` }
BlockMessageResponse is the response message for 'blocks' topic.
type EventResponse ¶
type EventResponse struct { models.BlockEvents // Embed BlockEvents struct to reuse its fields MessageIndex uint64 `json:"message_index"` }
EventResponse is the response message for 'events' topic.
func NewEventResponse ¶
func NewEventResponse(eventsResponse *backend.EventsResponse, index uint64) *EventResponse
NewEventResponse creates EventResponse instance.
type TransactionStatusesResponse ¶
type TransactionStatusesResponse struct { TransactionResult *commonmodels.TransactionResult `json:"transaction_result"` MessageIndex uint64 `json:"message_index"` }
TransactionStatusesResponse is the response message for 'events' topic.
func NewTransactionStatusesResponse ¶
func NewTransactionStatusesResponse( linkGenerator commonmodels.LinkGenerator, txResult *accessmodel.TransactionResult, index uint64, ) *TransactionStatusesResponse
NewTransactionStatusesResponse creates a TransactionStatusesResponse instance.