Documentation ¶
Index ¶
Constants ¶
View Source
const ( Header = '{' KeepAlive = "rpc.keepalive" RequestType = "request" ResponseType = "response" Version = "2.0" )
View Source
const ( ErrorParser = -32700 // jsonrpc2 解析消息失败 InvalidRequest = -32600 // 无效的请求 MethodNotFound = -32601 // 找不到方法 InvalidParams = -32602 // 无效的参数 ErrorInternal = -32603 // 内部错误 Unknown = -32004 // 未知的错误 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessage ¶
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Data json.RawMessage `json:"data"` }
type Request ¶
type Request struct { BaseMessage RequestTrait }
type RequestTrait ¶
type RequestTrait struct { Method string `json:"method"` Params json.RawMessage `json:"params"` }
type Response ¶
type Response struct { BaseMessage ResponseTrait }
type ResponseTrait ¶
Click to show internal directories.
Click to hide internal directories.