Documentation
¶
Index ¶
Constants ¶
View Source
const ( ValidTransaction = "ValidTransaction" GetBlockByHeight = "GetBlockByHeight" GetBlockByHash = "GetBlockByHash" GetBlockByTxKey = "GetBlockByTxKey" GetLastBlock = "GetLastBlock" GetTransactionByTxKey = "GetTransactionByTxKey" GetTransactionTotalNum = "GetTransactionTotalNum" GetBlockTotalNum = "GetBlockTotalNum" GetCurrentBlockHeight = "GetCurrentBlockHeight" )
method name
View Source
const ( Ok string = "OK" // 正常结果码 InvalidParameter string = "InvalidParameter" // 参数错误(包括参数格式、类型等错误) InvalidParameterValue string = "InvalidParameterValue" // 参数取值错误 MissingParameter string = "MissingParameter" // 缺少参数错误,必传参数没填 UnknownParameter string = "UnknownParameter" // 未知参数错误,用户多传未定义的参数会导致错误 SignatureExpire string = "SignatureExpire" // 签名过期 SecretIdNotFound string = "SecretIdNotFound" // 密钥不存在 SignatureFailure string = "SignatureFailure" // 签名错误 TokenFailure string = "TokenFailure" // token错误 MFAFailure string = "MFAFailure" // MFA错误 InvalidSecretId string = "InvalidSecretId" // 密钥非法(不是云API密钥类型) InternalError string = "InternalError" // 内部错误 InvalidAction string = "InvalidAction" // 接口不存在 RequestLimitExceeded string = "RequestLimitExceeded" // 请求的次数超过了频率限制 NoSuchVersion string = "NoSuchVersion" // 接口版本不存在 UnsupportedRegion string = "UnsupportedRegion" // 接口不支持所传地域 UnsupportedOperation string = "UnsupportedOperation" // 操作不支持 ResourceNotFound string = "ResourceNotFound" // 资源不存在 LimitExceeded string = "LimitExceeded" // 超过配额限制 ResourceInsufficient string = "ResourceInsufficient" // 资源不足 FailedOperation string = "FailedOperation" // 操作失败 ResourceInUse string = "ResourceInUse" // 资源被占用 DryRunOperation string = "DryRunOperation" // DryRun操作,代表请求将会是成功的,只是多传了DryRun参数 ResourcesSoldOut string = "ResourcesSoldOut" // 资源售罄 OperationDenied string = "OperationDenied" // 操作被拒绝 DBOperateError string = "DBOperateError" // 数据库操作错误 RecordNotFound string = "RecordNotFound" // 数据库中数据不存在错误 )
state message
Variables ¶
This section is empty.
Functions ¶
func JsonErrResponse ¶
JsonErrResponse return error json
Types ¶
type Response ¶
type Response struct { Code string `json:"code,omitempty"` // omit when success Message string `json:"message,omitempty"` Data interface{} `json:"data,omitempty"` }
Response struct
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
WebServer is a web listener of web for SPV and light node
func NewWebServer ¶
NewWebServer creates a instance of web server
type WithChainId ¶
WithChainId struct
type WithChainIdAndHash ¶
type WithChainIdAndHash struct { ChainId string `json:"chainId"` Hash string `json:"hash"` FromRemote bool `json:"fromRemote"` }
WithChainIdAndHash struct
func (*WithChainIdAndHash) IsComplete ¶
func (w *WithChainIdAndHash) IsComplete() error
IsComplete method
type WithChainIdAndHeight ¶
type WithChainIdAndHeight struct { ChainId string `json:"chainId"` Height uint64 `json:"height"` FromRemote bool `json:"fromRemote"` }
WithChainIdAndHeight struct
func (*WithChainIdAndHeight) IsComplete ¶
func (w *WithChainIdAndHeight) IsComplete() error
IsComplete method
Click to show internal directories.
Click to hide internal directories.