jsonrpc

package
v0.0.0-...-3d42942 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseAuth

func BaseAuth(user string, password string) string

Types

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type MethodMap

type MethodMap map[string]interface{}

func (MethodMap) Call

func (methodMap MethodMap) Call(name string, params []interface{}) Response

func (MethodMap) Register

func (methodMap MethodMap) Register(name string, method interface{})

type Request

type Request struct {
	JsonRpc string        `json:"jsonrpc"`
	Id      int           `json:"id"`
	Params  []interface{} `json:"params"`
	Method  string        `json:"method"`
}

type Response

type Response struct {
	Id     int         `json:"id"`
	Result interface{} `json:"result"`
	Error  Error       `json:"error"`
}

Jump to

Keyboard shortcuts

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