Documentation ¶
Index ¶
- Constants
- func BlockMetadataToProto(bm *BlockMetaDataDDBEntry) *api.BlockMetadata
- func MakeTransactionPartitionKey(tag uint32, txnHash string) string
- func TransformToTransaction(entry *TransactionDDBEntry) (*model.Transaction, error)
- type BlockMetaDataDDBEntry
- type EventDDBEntry
- type TransactionDDBEntry
- type VersionedEventDDBEntry
Constants ¶
View Source
const ( TransactionPidKeyName = "transaction_pid" TransactionSortKeyName = "transaction_rid" PartitionKeyFormat = "%d#%v" )
Variables ¶
This section is empty.
Functions ¶
func BlockMetadataToProto ¶
func BlockMetadataToProto(bm *BlockMetaDataDDBEntry) *api.BlockMetadata
func TransformToTransaction ¶
func TransformToTransaction(entry *TransactionDDBEntry) (*model.Transaction, error)
Types ¶
type BlockMetaDataDDBEntry ¶
type BlockMetaDataDDBEntry struct { BlockPid string `dynamodbav:"block_pid"` BlockRid string `dynamodbav:"block_rid"` Tag uint32 `dynamodbav:"tag"` Hash string `dynamodbav:"block_hash"` ParentHash string `dynamodbav:"parent_hash"` Height uint64 `dynamodbav:"height"` ParentHeight uint64 `dynamodbav:"parent_height"` ObjectKeyMain string `dynamodbav:"object_key_main"` Skipped bool `dynamodbav:"skipped"` Timestamp int64 `dynamodbav:"timestamp"` }
type EventDDBEntry ¶
type EventDDBEntry struct { EventId int64 `dynamodbav:"event_id"` EventType api.BlockchainEvent_Type `dynamodbav:"type"` BlockHeight uint64 `dynamodbav:"height"` // together with tag & hash, we will be able to use them to locate the corresponding metadata entry BlockHash string `dynamodbav:"hash"` Tag uint32 `dynamodbav:"tag"` ParentHash string `dynamodbav:"parent_hash"` MaxEventId int64 `dynamodbav:"max_event_id"` BlockSkipped bool `dynamodbav:"skipped"` EventTag uint32 `dynamodbav:"event_tag"` BlockTimestamp int64 `dynamodbav:"block_timestamp"` }
type TransactionDDBEntry ¶
type TransactionDDBEntry struct { TransactionPid string `dynamodbav:"transaction_pid"` TransactionRid string `dynamodbav:"transaction_rid"` Hash string `dynamodbav:"hash"` BlockHash string `dynamodbav:"block_hash"` BlockNumber uint64 `dynamodbav:"block_number"` BlockTag uint32 `dynamodbav:"block_tag"` }
func NewTransactionDDBEntry ¶
func NewTransactionDDBEntry(transaction *model.Transaction) *TransactionDDBEntry
type VersionedEventDDBEntry ¶
type VersionedEventDDBEntry struct { EventId string `dynamodbav:"event_id"` // will be formatted as {EventTag}-{Sequence} Sequence int64 `dynamodbav:"sequence"` BlockId string `dynamodbav:"block_id"` // will be formatted as {EventTag}-{BlockHeight} BlockHeight uint64 `dynamodbav:"height"` BlockHash string `dynamodbav:"hash"` EventType api.BlockchainEvent_Type `dynamodbav:"type"` Tag uint32 `dynamodbav:"tag"` ParentHash string `dynamodbav:"parent_hash"` BlockSkipped bool `dynamodbav:"skipped"` EventTag uint32 `dynamodbav:"event_tag"` BlockTimestamp int64 `dynamodbav:"block_timestamp"` }
Click to show internal directories.
Click to hide internal directories.