Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBatchRequestBody ¶
func GenerateBatchRequestBody(requests []*json.RawMessage) (*json.RawMessage, error)
JSONRPC2のバッチリクエストBodyを作成する
func GenerateRequestBody ¶
JSONRPC2のリクエストBodyを作成する
Types ¶
type Client ¶
type Client struct { URL string Headers map[string]string Requests []*ClientRequest }
func (*Client) AddRequest ¶
JSONRPC2のリクエストを登録する
type ClientRequest ¶
type ClientRequest struct { Version string `json:"jsonrpc"` ID string `json:"id"` Method string `json:"method"` Params *json.RawMessage `json:"params"` }
JSONRPC2実行のリクエスト
type ClientResponse ¶
type ClientResponse struct { Version string `json:"jsonrpc"` ID string `json:"id"` Result *json.RawMessage `json:"result,omitempty"` Error *ErrorResponse `json:"error,omitempty"` }
JSONRPC2実行のレスポンス
type ErrorResponse ¶
JSONRPC2のエラーレスポンス
Click to show internal directories.
Click to hide internal directories.