structs

package
v0.0.0-...-39c5ba2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchFullResponse

type BatchFullResponse []Response

BatchFullResponse is type for batch response

func (BatchFullResponse) MarshalEasyJSON

func (v BatchFullResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (BatchFullResponse) MarshalJSON

func (v BatchFullResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*BatchFullResponse) UnmarshalEasyJSON

func (v *BatchFullResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BatchFullResponse) UnmarshalJSON

func (v *BatchFullResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Error

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

Error struct for JSONRPC2 error @see https://www.jsonrpc.org/specification#error_object

func (Error) MarshalEasyJSON

func (v Error) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Error) MarshalJSON

func (v Error) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Error) UnmarshalEasyJSON

func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Error) UnmarshalJSON

func (v *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Request

type Request struct {
	Version string          `json:"jsonrpc"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params"`
	ID      interface{}     `json:"id"`
}

Request impementation of jsonrpc request @see https://www.jsonrpc.org/specification#request_object

func (Request) MarshalEasyJSON

func (v Request) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Request) MarshalJSON

func (v Request) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Request) UnmarshalEasyJSON

func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Request) UnmarshalJSON

func (v *Request) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Requests

type Requests []Request

Requests for batch request

func (Requests) MarshalEasyJSON

func (v Requests) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Requests) MarshalJSON

func (v Requests) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Requests) UnmarshalEasyJSON

func (v *Requests) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Requests) UnmarshalJSON

func (v *Requests) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Response

type Response struct {
	Version string           `json:"jsonrpc"`
	Result  *json.RawMessage `json:"result,omitempty"`
	Error   *Error           `json:"error,omitempty"`
	ID      interface{}      `json:"id"`
}

Response struct for full jsonrpc response @see https://www.jsonrpc.org/specification#response_object

func (Response) MarshalEasyJSON

func (v Response) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Response) MarshalJSON

func (v Response) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Response) UnmarshalEasyJSON

func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Response) UnmarshalJSON

func (v *Response) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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