rpc

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RPCHandler

func RPCHandler(w http.ResponseWriter, r *http.Request)

func RPCInit

func RPCInit(tmpMncc *content.ContentClient)

Types

type Error

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

type Request

type Request struct {
	Jsonrpc string   `json:"jsonrpc"`
	Method  string   `json:"method"`
	Params  []string `json:"params"`
	ID      int      `json:"id"`
}

type Response

type Response struct {
	Jsonrpc string  `json:"jsonrpc"`
	Result  *Result `json:"result,omitempty"` //interface{} `json:"result,omitempty"`
	Error   *Error  `json:"error,omitempty"`
	ID      int     `json:"id"`
}

type Result

type Result struct {
	Type string      `json:"type"`
	Data interface{} `json:"data,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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