rpc

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ID0 []byte = nil

Functions

This section is empty.

Types

type JsonRpcMessage

type JsonRpcMessage struct {
	Version string          `json:"jsonrpc,omitempty"`
	ID      json.RawMessage `json:"id,omitempty"`
	Method  string          `json:"method,omitempty"`
	Params  json.RawMessage `json:"params,omitempty"`
	Error   *JsonrpcError   `json:"error,omitempty"`
	Result  json.RawMessage `json:"result,omitempty"`
}

func NewJsonRpcMessage

func NewJsonRpcMessage(id []byte) *JsonRpcMessage

func NewJsonRpcMessageWithError

func NewJsonRpcMessageWithError(id []byte, code int, err string) *JsonRpcMessage

func ParseJsonRpcMessage

func ParseJsonRpcMessage(data []byte) *JsonRpcMessage

type JsonrpcError

type JsonrpcError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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