Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonRPCError ¶
type JsonRPCError struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` }
func (*JsonRPCError) Error ¶
func (err *JsonRPCError) Error() string
type JsonRPCNotification ¶
type JsonRPCNotification struct { JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params interface{} `json:"params,omitempty"` }
func NewNotification ¶
func NewNotification(method string, params interface{}) *JsonRPCNotification
func (*JsonRPCNotification) Get ¶
func (notify *JsonRPCNotification) Get(name string) (interface{}, error)
func (*JsonRPCNotification) GetString ¶
func (notify *JsonRPCNotification) GetString(name string) (string, error)
func (*JsonRPCNotification) Parse ¶
func (reply *JsonRPCNotification) Parse(bytes []byte) error
type JsonRPCRequest ¶
type JsonRPCRequest struct { JSONRPC string `json:"jsonrpc"` ID interface{} `json:"id"` Method string `json:"method"` Params interface{} `json:"params,omitempty"` }
func NewRequest ¶
func NewRequest(id interface{}, method string, params interface{}) *JsonRPCRequest
func (*JsonRPCRequest) Buffer ¶
func (request *JsonRPCRequest) Buffer() ([]byte, error)
func (*JsonRPCRequest) Parse ¶
func (request *JsonRPCRequest) Parse(bytes []byte) error
type JsonRPCResponse ¶
type JsonRPCResponse struct { JSONRPC string `json:"jsonrpc"` ID interface{} `json:"id"` Result interface{} `json:"result,omitempty"` Error *JsonRPCError `json:"error,omitempty"` }
func (*JsonRPCResponse) GetString ¶
func (reply *JsonRPCResponse) GetString(name string) (string, error)
func (*JsonRPCResponse) IsError ¶
func (reply *JsonRPCResponse) IsError() bool
func (*JsonRPCResponse) Parse ¶
func (reply *JsonRPCResponse) Parse(bytes []byte) error
Click to show internal directories.
Click to hide internal directories.