parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	BlockNumber     uint64
	Prevhash        []byte
	Datahash        []byte
	BlockSignatures []blocklib.BlockSignature
	Channel         string
	Txs             []blocklib.Tx
	Events          []*peer.ChaincodeEvent
}

type Parser

type Parser interface {
	// Parse is responsible for parsing passed block
	Parse(block *common.Block) (*Data, error)
}

Parser serves as a contract for the implementation of the logic responsible for processing data from the blockchain. Simply put, this is about how exactly and into what constituent parts we will disassemble the blocks.

type ParserImpl

type ParserImpl struct {
}

func New

func New() *ParserImpl

func (*ParserImpl) Parse

func (p *ParserImpl) Parse(block *common.Block) (*Data, error)

Jump to

Keyboard shortcuts

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