Documentation ¶
Index ¶
- Constants
- func CapStringLen(inp string) string
- func GetDataToParse(rpcInput RPCInput, dataSource int) (interface{}, error)
- func Parse(rpcInput RPCInput, blockParser spectypes.BlockParser, dataSource int) ([]interface{}, error)
- func ParseBlockFromParams(rpcInput RPCInput, blockParser spectypes.BlockParser) (int64, error)
- func ParseBlockFromReply(rpcInput RPCInput, blockParser spectypes.BlockParser) (int64, error)
- func ParseByArg(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
- func ParseCanonical(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
- func ParseDefault(rpcInput RPCInput, input []string, dataSource int) []interface{}
- func ParseDefaultBlockParameter(block string) (int64, error)
- func ParseDictionary(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
- func ParseDictionaryOrDefault(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
- func ParseDictionaryOrOrdered(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
- func ParseMessageResponse(rpcInput RPCInput, resultParser spectypes.BlockParser) ([]interface{}, error)
- type RPCInput
Constants ¶
const ( PARSE_PARAMS = 0 PARSE_RESULT = 1 )
Variables ¶
This section is empty.
Functions ¶
func CapStringLen ¶
func GetDataToParse ¶
Move to RPCInput
func Parse ¶
func Parse(rpcInput RPCInput, blockParser spectypes.BlockParser, dataSource int) ([]interface{}, error)
this function returns the block that was requested,
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)
this function returns the block that was requested,
func ParseByArg ¶
func ParseCanonical ¶
expect input to be keys[a,b,c] and a canonical object such as
{ "a": { "b": { "c": "wanted result" } } }
should output an interface array with "wanted result" in first index 0
func ParseDefault ¶
func ParseDictionary ¶
ParseDictionary return a value of prop specified in args if exists in dictionary if not return an error
func ParseDictionaryOrDefault ¶ added in v0.5.0
func ParseDictionaryOrDefault(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
ParseDictionaryOrDefault return a value of prop specified in args if exists in dictionary if not it returns default value also specified in args
func ParseDictionaryOrOrdered ¶
func ParseDictionaryOrOrdered(rpcInput RPCInput, input []string, dataSource int) ([]interface{}, error)
ParseDictionaryOrOrdered return a value of prop specified in args if exists in dictionary if not return an item from specified index
func ParseMessageResponse ¶
func ParseMessageResponse(rpcInput RPCInput, resultParser spectypes.BlockParser) ([]interface{}, error)
this function returns the block that was requested,