jsonrpcproto

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONRPCProtoFunc

func NewJSONRPCProtoFunc() proto.ProtoFunc

Types

type ErrorData

type ErrorData struct {
	Code    int32  `json:"code"`
	Message string `json:"message"`
	Class   string `json:"class"`
}

type ErrorResponse

type ErrorResponse struct {
	Jsonrpc string      `json:"jsonrpc"`
	Id      int64       `json:"id"`
	Context interface{} `json:"context"`
	Error   ErrorStruct `json:"error"`
}

type ErrorStruct

type ErrorStruct struct {
	Code    int32       `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type Request

type Request struct {
	Jsonrpc string      `json:"jsonrpc"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params"`
	Id      int64       `json:"id"`
	Context interface{} `json:"context"`
}

type Response

type Response struct {
	Jsonrpc string      `json:"jsonrpc"`
	Id      int64       `json:"id"`
	Result  interface{} `json:"result"`
	Context interface{} `json:"context"`
}

Jump to

Keyboard shortcuts

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