parser

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PARSE_PARAMS = 0
	PARSE_RESULT = 1
)

Variables

View Source
var ValueNotSetError = sdkerrors.New("Value Not Set ", 6662, "when trying to parse, the value that we attempted to parse did not exist")

Functions

func CapStringLen

func CapStringLen(inp string) string

func ParseBlockFromParams

func ParseBlockFromParams(rpcInput RPCInput, blockParser spectypes.BlockParser) (int64, error)

this function returns the block that was requested,

func ParseBlockFromReply

func ParseBlockFromReply(rpcInput RPCInput, blockParser spectypes.BlockParser) (int64, error)

func ParseDefaultBlockParameter

func ParseDefaultBlockParameter(block string) (int64, error)

func ParseFromReply

func ParseFromReply(rpcInput RPCInput, blockParser spectypes.BlockParser) (string, error)

This returns the parsed response without decoding

func ParseFromReplyAndDecode

func ParseFromReplyAndDecode(rpcInput RPCInput, resultParser spectypes.BlockParser) (string, error)

This returns the parsed response after decoding

Types

type RPCInput

type RPCInput interface {
	GetParams() interface{}
	GetResult() json.RawMessage
	ParseBlock(block string) (int64, error)
	GetHeaders() []pairingtypes.Metadata
}

Jump to

Keyboard shortcuts

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