Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RPCFailed ¶
func RPCFailed(err error, w http.ResponseWriter)
RPCFailed handles errors encountered when requesting daemon
func RequestDaemon ¶
func RequestDaemon(coinData conf.CoinData, rpcReqData RPCRequestData, daemonConf conf.DaemonConfig) (*http.Response, error)
RequestDaemon requests the data via the daemon's RPC api allows auto switches between the testnet and live depending on the config
Types ¶
type RPCRequestData ¶
type RPCRequestData struct { Method string `json:"method"` Params interface{} `json:"params"` }
RPCRequestData defines method and params
type RPCResponse ¶
type RPCResponse struct { Code int `json:"code"` Data string `json:"data"` Message string `json:"message"` }
RPCResponse defines code, data, and message
Click to show internal directories.
Click to hide internal directories.