common

package
v1.0.3-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: LGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CLIERR_OK                  = 0
	CLIERR_HTTP_METHOD_INVALID = 1001
	CLIERR_INVALID_REQUEST     = 1002
	CLIERR_INVALID_PARAMS      = 1003
	CLIERR_UNSUPPORT_METHOD    = 1004
	CLIERR_ACCOUNT_UNLOCK      = 1005
	CLIERR_INVALID_TX          = 1006
	CLIERR_ABI_NOT_FOUND       = 1007
	CLIERR_ABI_UNMATCH         = 1008
	CLIERR_DUPLICATE_SIG       = 1009
	CLIERR_INTERNAL_ERR        = 900
)

Variables

View Source
var DefWalletStore *store.WalletStore
View Source
var RPCErrorDesc = map[int]string{
	CLIERR_OK:                  "",
	CLIERR_HTTP_METHOD_INVALID: "invalid http method",
	CLIERR_INVALID_REQUEST:     "invalid request",
	CLIERR_INVALID_PARAMS:      "invalid params",
	CLIERR_UNSUPPORT_METHOD:    "unsupport method",
	CLIERR_INVALID_TX:          "invalid tx",
	CLIERR_ABI_NOT_FOUND:       "abi not found",
	CLIERR_ABI_UNMATCH:         "abi unmatch",
	CLIERR_DUPLICATE_SIG:       "Duplicate sig",
	CLIERR_INTERNAL_ERR:        "internal error",
}

Functions

func GetCLIErrorDesc

func GetCLIErrorDesc(errorCode int) string

Types

type CliRpcRequest

type CliRpcRequest struct {
	Qid     string          `json:"qid"`
	Params  json.RawMessage `json:"params"`
	Account string          `json:"account"`
	Pwd     string          `json:"pwd"`
	Method  string          `json:"method"`
}

func (*CliRpcRequest) GetAccount added in v1.0.2

func (this *CliRpcRequest) GetAccount() (*account.Account, error)

type CliRpcResponse

type CliRpcResponse struct {
	Qid       string      `json:"qid"`
	Method    string      `json:"method"`
	Result    interface{} `json:"result"`
	ErrorCode int         `json:"error_code"`
	ErrorInfo string      `json:"error_info"`
}

Jump to

Keyboard shortcuts

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