Documentation ¶
Index ¶
- type Conn
- type ConnRemoteAddr
- type JsonrpcMessage
- func (msg *JsonrpcMessage) ErrorResponse(err error) *JsonrpcMessage
- func (msg *JsonrpcMessage) IsGetBlockByNumber() bool
- func (msg *JsonrpcMessage) IsGetTransactionCount() bool
- func (msg *JsonrpcMessage) IsGetTransactionReceipt() bool
- func (msg *JsonrpcMessage) IsPrivRawTransaction() bool
- func (msg *JsonrpcMessage) IsPrivTransaction() bool
- func (msg *JsonrpcMessage) IsRawTransaction() bool
- func (msg *JsonrpcMessage) Response(result interface{}) *JsonrpcMessage
- func (msg *JsonrpcMessage) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { io.ReadWriteCloser SetWriteDeadline(time.Time) error }
Conn is a subset of the methods of net.Conn which are sufficient for ServerCodec.
type ConnRemoteAddr ¶
type ConnRemoteAddr interface {
RemoteAddr() string
}
ConnRemoteAddr wraps the RemoteAddr operation, which returns a description of the peer address of a connection. If a Conn also implements ConnRemoteAddr, this description is used in log messages.
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 *jsonError `json:"error,omitempty"` Result json.RawMessage `json:"result,omitempty"` }
JsonrpcMessage A value of this type can a JSON-RPC request, notification, successful response or error response. Which one it is depends on the fields.
func (*JsonrpcMessage) ErrorResponse ¶
func (msg *JsonrpcMessage) ErrorResponse(err error) *JsonrpcMessage
ErrorResponse ...
func (*JsonrpcMessage) IsGetBlockByNumber ¶
func (msg *JsonrpcMessage) IsGetBlockByNumber() bool
IsGetBlockByNumber ...
func (*JsonrpcMessage) IsGetTransactionCount ¶
func (msg *JsonrpcMessage) IsGetTransactionCount() bool
IsGetTransactionCount ...
func (*JsonrpcMessage) IsGetTransactionReceipt ¶
func (msg *JsonrpcMessage) IsGetTransactionReceipt() bool
IsGetTransactionReceipt ...
func (*JsonrpcMessage) IsPrivRawTransaction ¶
func (msg *JsonrpcMessage) IsPrivRawTransaction() bool
IsPrivRawTransaction ...
func (*JsonrpcMessage) IsPrivTransaction ¶
func (msg *JsonrpcMessage) IsPrivTransaction() bool
IsPrivTransaction ...
func (*JsonrpcMessage) IsRawTransaction ¶
func (msg *JsonrpcMessage) IsRawTransaction() bool
IsRawTransaction ...
func (*JsonrpcMessage) Response ¶
func (msg *JsonrpcMessage) Response(result interface{}) *JsonrpcMessage
Response ...
func (*JsonrpcMessage) String ¶
func (msg *JsonrpcMessage) String() string
Click to show internal directories.
Click to hide internal directories.