Documentation
¶
Index ¶
- type Decoder
- func (d *Decoder) DecodeDynamicMessage(msgDesc *desc.MessageDescriptor, anyin *anypb.Any) json.RawMessage
- func (d *Decoder) DecodeDynamicStoreDeltas(msgType string, msgDesc *desc.MessageDescriptor, in []byte) json.RawMessage
- func (d *Decoder) GetMessageDescriptor(modName string) *desc.MessageDescriptor
- func (d *Decoder) GetMessageType(modName string) string
- func (d *Decoder) HasMessageType(modName string) bool
- func (d *Decoder) SetFormatting(indent string, emitDefaults bool)
- func (d *Decoder) WrapMessage(msgType string, blockNum uint64, modName string, data json.RawMessage) ([]byte, error)
- type ErrorWrap
- type ModuleWrap
- type OutputStreamPattern
- type UnknownWrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoder(pkg *pbsubstreams.Package, outputStreamNames []string) (*Decoder, error)
func NewDecoderFromManifest ¶
func NewDecoderFromManifest(pkg *pbsubstreams.Package, msgDescs map[string]*manifest.ModuleDescriptor) (*Decoder, error)
func (*Decoder) DecodeDynamicMessage ¶
func (d *Decoder) DecodeDynamicMessage(msgDesc *desc.MessageDescriptor, anyin *anypb.Any) json.RawMessage
func (*Decoder) DecodeDynamicStoreDeltas ¶
func (d *Decoder) DecodeDynamicStoreDeltas(msgType string, msgDesc *desc.MessageDescriptor, in []byte) json.RawMessage
func (*Decoder) GetMessageDescriptor ¶
func (d *Decoder) GetMessageDescriptor(modName string) *desc.MessageDescriptor
func (*Decoder) GetMessageType ¶
func (*Decoder) HasMessageType ¶
func (*Decoder) SetFormatting ¶
func (*Decoder) WrapMessage ¶
func (d *Decoder) WrapMessage(msgType string, blockNum uint64, modName string, data json.RawMessage) ([]byte, error)
WrapMessage wraps data content with module metadata (@module, @block, @type, @data)
type ModuleWrap ¶
type ModuleWrap struct { Module string `json:"@module"` BlockNum uint64 `json:"@block"` Type string `json:"@type"` Data json.RawMessage `json:"@data"` }
type OutputStreamPattern ¶
type OutputStreamPattern struct {
// contains filtered or unexported fields
}
func NewOutputStreamPattern ¶
func NewOutputStreamPattern(pattern string) OutputStreamPattern
func (*OutputStreamPattern) Matches ¶
func (o *OutputStreamPattern) Matches(input string) bool
type UnknownWrap ¶
type UnknownWrap struct { UnknownType string `json:"@unknown"` String string `json:"@str"` Bytes []byte `json:"@bytes"` }
Helper types
Click to show internal directories.
Click to hide internal directories.