Documentation ¶
Index ¶
- func Abi(b []byte) (abi json.RawMessage, err error)
- func Account(b []byte, kind string) (trace json.RawMessage, err error)
- func BadK1SumToPub(pk string) (ecc.PublicKey, string, error)
- func Block(b []byte, fallbackUrl string) (header json.RawMessage, schedule json.RawMessage, err error)
- func BuildTrie() (intTrie *trie.Trie, floatTrie *trie.Trie, boolTrie *trie.Trie)
- func Fixup(fixme map[string]interface{}) map[string]interface{}
- func Table(b []byte) (j json.RawMessage, err error)
- func Trace(b []byte) (trace json.RawMessage, err error)
- type AbiUpdate
- type AccountUpdate
- type BlockFinished
- type BlockHeader
- type Extension
- type FullBlock
- type FullTrace
- type Kvo
- type MsgData
- type ProducerKeyString
- type ProducerSchedule
- type ProducerScheduleString
- type Schedule
- type SignedBlock
- type SignedBlockHeader
- type TableData
- type TraceResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadK1SumToPub ¶
BadK1SumToPub handles an issue where we are getting invalid checksums on public keys
func Block ¶
func Block(b []byte, fallbackUrl string) (header json.RawMessage, schedule json.RawMessage, err error)
Block splits a block into the header and a schedule (if present), it also calculates block number and id
func BuildTrie ¶
func BuildTrie() (intTrie *trie.Trie, floatTrie *trie.Trie, boolTrie *trie.Trie)
BuildTrie creates a trie used to search for type casts, it is slightly faster than trying every possible value.
func Fixup ¶
Fixup applies type casting for fields that need changed. For example an amount that should be an int but is a string most of these could be handled by logstash but because they are deeply nested it would require using the ruby plugin so this should be faster. It still slows the ingest process by roughly double, but not having the numeric types is not ok.
Types ¶
type AccountUpdate ¶
type AccountUpdate struct { Id string `json:"id"` RecordType string `json:"record_type"` BlockNum interface{} `json:"block_num"` BlockTime string `json:"block_timestamp"` Data json.RawMessage `json:"data"` }
type BlockFinished ¶
type BlockFinished struct { Data struct { BlockNum string `json:"block_num"` } `json:"data"` }
type BlockHeader ¶
type BlockHeader struct { Timestamp eos.BlockTimestamp `json:"timestamp"` Producer eos.AccountName `json:"producer"` Confirmed interface{} `json:"confirmed"` Previous eos.Checksum256 `json:"previous"` TransactionMRoot eos.Checksum256 `json:"transaction_mroot"` ActionMRoot eos.Checksum256 `json:"action_mroot"` ScheduleVersion interface{} `json:"schedule_version"` //NewProducers *ProducerSchedule `json:"new_producers" eos:"optional"` NewProducers map[string]interface{} `json:"new_producers" eos:"optional"` HeaderExtensions []*Extension `json:"header_extensions"` deadlock.Mutex }
func (*BlockHeader) BlockID ¶
func (b *BlockHeader) BlockID() (string, []ProducerKeyString, error)
func (*BlockHeader) BlockNumber ¶
func (b *BlockHeader) BlockNumber() uint32
type FullBlock ¶
type FullBlock struct { RecordType string `json:"record_type"` BlockTime time.Time `json:"block_time"` Block SignedBlock `json:"block"` BlockNum interface{} `json:"block_num"` BlockId string `json:"id"` }
FullBlock duplicates eos.SignedBlock because the provided json has metadata
type FullTrace ¶
type FullTrace struct { NetUsageWords string `json:"net_usage_words"` Scheduled string `json:"scheduled"` Partial map[string]interface{} `json:"partial"` AccountRamDelta interface{} `json:"account_ram_delta"` NetUsage string `json:"net_usage"` Elapsed string `json:"elapsed"` ErrorCode interface{} `json:"error_code"` CpuUsageUs string `json:"cpu_usage_us"` FailedDtrxTrace interface{} `json:"failed_dtrx_trace"` Except string `json:"except"` Status string `json:"status"` Id string `json:"id"` ActionTraces []map[string]interface{} `json:"action_traces"` }
type MsgData ¶
type MsgData struct {
Data json.RawMessage `json:"data"`
}
type ProducerKeyString ¶
type ProducerSchedule ¶
type ProducerSchedule struct { Version interface{} `json:"version"` Producers []eos.ProducerKey `json:"producers"` }
type ProducerScheduleString ¶
type ProducerScheduleString struct { Version uint32 `json:"version"` Producers []ProducerKeyString `json:"producers"` }
type Schedule ¶
type Schedule struct { Id string `json:"id"` RecordType string `json:"record_type"` Producers []ProducerKeyString `json:"producers"` ScheduleVersion interface{} `json:"schedule"` BlockNum interface{} `json:"block_num"` BlockTime time.Time `json:"block_time"` }
Schedule duplicates an eos.OptionalProducerSchedule but adds some metadata
type SignedBlock ¶
type SignedBlock struct { RecordType string `json:"record_type"` SignedBlockHeader Transactions []map[string]interface{} `json:"transactions"` BlockExtensions json.RawMessage `json:"block_extensions"` }
type SignedBlockHeader ¶
type SignedBlockHeader struct { BlockHeader ProducerSignature ecc.Signature `json:"producer_signature"` }