daemonrpc

package
v0.0.0-...-7ba06b6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotImplemented

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

NotImplemented: this is a generic function for daeomn apis

func RequestDaemon

func RequestDaemon(rpcReqData RpcRequestData, navConf conf.NavConfig) (*http.Response, error)

RequestDaemon request the data via the daemon's rpc api it also allows auto switches between the testnet and live depending on the config

func RpcFailed

func RpcFailed(err error, w http.ResponseWriter, r *http.Request)

Types

type RpcRequestData

type RpcRequestData struct {
	Method string      `json:"method"`
	Params interface{} `json:"params"`
}

type RpcResp

type RpcResp struct {
	Code    int    `json:"code"`
	Data    string `json:"data"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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