mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 20:12:25 +00:00
- Change package name general_server to gateway - Changing the structure of directories and packages - Adding vendor to the project
30 lines
624 B
Go
30 lines
624 B
Go
package rpc
|
|
|
|
type RPCRequest struct {
|
|
JSONRPC string `json:"jsonrpc"`
|
|
ID any `json:"id"`
|
|
Method string `json:"method"`
|
|
Params RPCRequestParams `json:"params"`
|
|
}
|
|
|
|
type RPCRequestParams struct {
|
|
ContextVersion string `json:"context-version"`
|
|
Method map[string]any `json:"method-params"`
|
|
}
|
|
|
|
type RPCResponse struct {
|
|
JSONRPC string `json:"jsonrpc"`
|
|
ID any `json:"id"`
|
|
Result any `json:"result"`
|
|
}
|
|
|
|
type RPCError struct {
|
|
JSONRPC string `json:"jsonrpc"`
|
|
ID any `json:"id"`
|
|
Error any `json:"error"`
|
|
}
|
|
|
|
const (
|
|
JSONRPCVersion = "2.0"
|
|
)
|