Documentation ¶
Index ¶
- Constants
- func Errcode(code int, p ...string) (res []byte, err error)
- func RegisterErrcode(code int, message string)
- func Tojson(data interface{}) ([]byte, error)
- type GetAccount
- type GetNewAddress
- type Getinfo
- type Result
- type RpcHandler
- type RpcJson
- func (rj *RpcJson) Get(key string) (interface{}, bool)
- func (rj *RpcJson) Type(key string) string
- func (this *RpcJson) VerifyExistMust(key, types string) (res []byte, err error, itr interface{})
- func (this *RpcJson) VerifyExistOptional(key, types string) (res []byte, err error, itr interface{})
- func (rj *RpcJson) VerifyType(key, types string) bool
Constants ¶
View Source
const ( Success = 2000 //成功 NoMethod = 4001 //没有这个方法 TypeWrong = 5001 //参数类型错误 NoField = 5002 //缺少参数 Nomarl = 5003 //一般错误,请看错误提示信息 Timeout = 5004 //超时 Exist = 5005 //已经存在 FailPwd = 5006 //密码错误 NotExist = 5007 //不存在 )
Variables ¶
This section is empty.
Functions ¶
func RegisterErrcode ¶
Types ¶
type GetAccount ¶
type GetAccount struct { Balance uint64 `json:"Balance"` BalanceFrozen uint64 `json:"BalanceFrozen"` }
帐号余额
type Getinfo ¶
type Getinfo struct { Netid []byte `json:"netid"` //网络版本号 TotalAmount uint64 `json:"TotalAmount"` //发行总量 Balance uint64 `json:"balance"` //可用余额 BalanceFrozen uint64 `json:"BalanceFrozen"` //冻结的余额 BalanceLockup uint64 `json:"BalanceLockup"` //锁仓的余额 Testnet bool `json:"testnet"` //是否是测试网络 Blocks uint64 `json:"blocks"` //已经同步到的区块高度 Group uint64 `json:"group"` //区块组高度 StartingBlock uint64 `json:"StartingBlock"` //区块开始高度 StartBlockTime uint64 `json:"StartBlockTime"` //创始区块出块时间 HighestBlock uint64 `json:"HighestBlock"` //所链接的节点的最高高度 CurrentBlock uint64 `json:"CurrentBlock"` //已经同步到的区块高度 PulledStates uint64 `json:"PulledStates"` //正在同步的区块高度 BlockTime uint64 `json:"BlockTime"` //出块时间 LightNode uint64 `json:"LightNode"` //轻节点押金数量 CommunityNode uint64 `json:"CommunityNode"` //社区节点押金数量 WitnessNode uint64 `json:"WitnessNode"` //见证人押金数量 NameDepositMin uint64 `json:"NameDepositMin"` //域名押金最少金额 AddrPre string `json:"AddrPre"` //地址前缀 }
详情
type RpcHandler ¶
type RpcJson ¶
func (*RpcJson) VerifyExistMust ¶
验证必须存在
func (*RpcJson) VerifyExistOptional ¶
func (this *RpcJson) VerifyExistOptional(key, types string) (res []byte, err error, itr interface{})
验证可选存在
func (*RpcJson) VerifyType ¶
Click to show internal directories.
Click to hide internal directories.