Documentation
¶
Index ¶
- func AccountGet(w http.ResponseWriter, r *http.Request)
- func BlockInfoGet(w http.ResponseWriter, r *http.Request)
- func BlockMinePost(w http.ResponseWriter, r *http.Request)
- func BlockRollback(w http.ResponseWriter, r *http.Request)
- func ChainNew(w http.ResponseWriter, r *http.Request)
- func CryptoCheck(w http.ResponseWriter, r *http.Request)
- func CryptoSign(w http.ResponseWriter, r *http.Request)
- func DataGet(w http.ResponseWriter, r *http.Request)
- func DataNextKeyGet(w http.ResponseWriter, r *http.Request)
- func DataPost(w http.ResponseWriter, r *http.Request)
- func EventPost(w http.ResponseWriter, r *http.Request)
- func HashPowerGet(w http.ResponseWriter, r *http.Request)
- func HistoryInGet(w http.ResponseWriter, r *http.Request)
- func HistoryOutGet(w http.ResponseWriter, r *http.Request)
- func Index(w http.ResponseWriter, r *http.Request)
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter() *mux.Router
- func NodePost(w http.ResponseWriter, r *http.Request)
- func NodesGet(w http.ResponseWriter, r *http.Request)
- func TransactionAppInfoGet(w http.ResponseWriter, r *http.Request)
- func TransactionAppLifePost(w http.ResponseWriter, r *http.Request)
- func TransactionInfoGet(w http.ResponseWriter, r *http.Request)
- func TransactionMinerGet(w http.ResponseWriter, r *http.Request)
- func TransactionMinerPost(w http.ResponseWriter, r *http.Request)
- func TransactionMovePost(w http.ResponseWriter, r *http.Request)
- func TransactionNew(w http.ResponseWriter, r *http.Request)
- func TransactionNewAppPost(w http.ResponseWriter, r *http.Request)
- func TransactionRunAppPost(w http.ResponseWriter, r *http.Request)
- func TransactionTransferPost(w http.ResponseWriter, r *http.Request)
- func VersionGet(w http.ResponseWriter, r *http.Request)
- type Account
- type AppLife
- type ChainNewInfo
- type CryptoInfo
- type DataInfo
- type DataNextKey
- type EventInfo
- type Miner
- type MinerInfo
- type NewApp
- type RespOfNewTrans
- type Route
- type Routes
- type RunApp
- type TransInfo
- type TransMoveInfo
- type TransferInfo
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountGet ¶
func AccountGet(w http.ResponseWriter, r *http.Request)
AccountGet get account of the address on the chain
func BlockInfoGet ¶
func BlockInfoGet(w http.ResponseWriter, r *http.Request)
BlockInfoGet get block info
func BlockRollback ¶
func BlockRollback(w http.ResponseWriter, r *http.Request)
BlockRollback rollback
func CryptoCheck ¶ added in v0.3.2
func CryptoCheck(w http.ResponseWriter, r *http.Request)
CryptoCheck Crypto:check the sign
func CryptoSign ¶ added in v0.3.2
func CryptoSign(w http.ResponseWriter, r *http.Request)
CryptoSign crypto:sign message
func DataGet ¶ added in v0.3.2
func DataGet(w http.ResponseWriter, r *http.Request)
DataGet read data
func DataNextKeyGet ¶ added in v0.3.2
func DataNextKeyGet(w http.ResponseWriter, r *http.Request)
DataNextKeyGet get next key
func DataPost ¶ added in v0.3.9
func DataPost(w http.ResponseWriter, r *http.Request)
DataPost post data
func HashPowerGet ¶ added in v0.4.1
func HashPowerGet(w http.ResponseWriter, r *http.Request)
HashPowerGet get hashpower info
func HistoryInGet ¶
func HistoryInGet(w http.ResponseWriter, r *http.Request)
HistoryInGet get transaction history of recieve
func HistoryOutGet ¶
func HistoryOutGet(w http.ResponseWriter, r *http.Request)
HistoryOutGet get transaction history of send
func TransactionAppInfoGet ¶
func TransactionAppInfoGet(w http.ResponseWriter, r *http.Request)
TransactionAppInfoGet get app info
func TransactionAppLifePost ¶
func TransactionAppLifePost(w http.ResponseWriter, r *http.Request)
TransactionAppLifePost update app life
func TransactionInfoGet ¶
func TransactionInfoGet(w http.ResponseWriter, r *http.Request)
TransactionInfoGet get transaction info
func TransactionMinerGet ¶
func TransactionMinerGet(w http.ResponseWriter, r *http.Request)
TransactionMinerGet get miner info
func TransactionMinerPost ¶
func TransactionMinerPost(w http.ResponseWriter, r *http.Request)
TransactionMinerPost register miner
func TransactionMovePost ¶
func TransactionMovePost(w http.ResponseWriter, r *http.Request)
TransactionMovePost move cost to other chain
func TransactionNew ¶ added in v0.3.5
func TransactionNew(w http.ResponseWriter, r *http.Request)
TransactionNew new transaction
func TransactionNewAppPost ¶
func TransactionNewAppPost(w http.ResponseWriter, r *http.Request)
TransactionNewAppPost new app
func TransactionRunAppPost ¶
func TransactionRunAppPost(w http.ResponseWriter, r *http.Request)
TransactionRunAppPost run app
func TransactionTransferPost ¶ added in v0.3.9
func TransactionTransferPost(w http.ResponseWriter, r *http.Request)
TransactionTransferPost transfer
func VersionGet ¶
func VersionGet(w http.ResponseWriter, r *http.Request)
VersionGet get software version
Types ¶
type Account ¶
type Account struct { Chain uint64 `json:"chain,omitempty"` Address string `json:"address,omitempty"` Cost uint64 `json:"cost,omitempty"` }
Account account
type AppLife ¶
type AppLife struct { Energy uint64 `json:"energy,omitempty"` AppName string `json:"app_name,omitempty"` Life uint64 `json:"life,omitempty"` TransKey string `json:"trans_key,omitempty"` }
AppLife app life
type ChainNewInfo ¶
type ChainNewInfo struct { DstChain uint64 `json:"dst_chain,omitempty"` Cost uint64 `json:"cost,omitempty"` Energy uint64 `json:"energy,omitempty"` TransKey string `json:"trans_key,omitempty"` }
ChainNewInfo info of new chain
type CryptoInfo ¶ added in v0.3.2
CryptoInfo crypto info
type DataInfo ¶ added in v0.3.2
type DataInfo struct { AppName string `json:"app_name,omitempty"` StructName string `json:"struct_name,omitempty"` IsDBData bool `json:"is_db_data,omitempty"` Key string `json:"key,omitempty"` Value string `json:"value,omitempty"` Life uint64 `json:"life,omitempty"` }
DataInfo data info
type DataNextKey ¶ added in v0.3.2
type DataNextKey struct { AppName string `json:"app_name,omitempty"` StructName string `json:"struct_name,omitempty"` PreKey string `json:"pre_key,omitempty"` IsDBData bool `json:"is_db_data,omitempty"` Key string `json:"key,omitempty"` }
DataNextKey the next key of data
type Miner ¶
type Miner struct { TagetChain uint64 `json:"taget_chain,omitempty"` Index uint64 `json:"index,omitempty"` Cost uint64 `json:"cost,omitempty"` Energy uint64 `json:"energy,omitempty"` TransKey string `json:"trans_key,omitempty"` }
Miner miner info
type NewApp ¶
type NewApp struct { Cost uint64 `json:"cost,omitempty"` Energy uint64 `json:"energy,omitempty"` CodePath string `json:"code_path,omitempty"` IsPrivate bool `json:"is_private,omitempty"` EnableRun bool `json:"enable_run,omitempty"` EnableImport bool `json:"enable_import,omitempty"` AppName string `json:"app_name,omitempty"` TransKey string `json:"trans_key,omitempty"` }
NewApp new app
type RespOfNewTrans ¶ added in v0.3.2
type RespOfNewTrans struct { Chain uint64 `json:"chain,omitempty"` TransKey string `json:"trans_key,omitempty"` }
RespOfNewTrans the response of New Transaction
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Route 单个http路由信息的结构体
type RunApp ¶
type RunApp struct { Cost uint64 `json:"cost,omitempty"` Energy uint64 `json:"energy,omitempty"` AppName string `json:"app_name,omitempty"` Param string `json:"param,omitempty"` ParamType string `json:"param_type,omitempty"` JSONParam interface{} `json:"json_param,omitempty"` }
RunApp run app
type TransInfo ¶
type TransInfo struct { core.TransactionHead Key []byte Size int Others interface{} }
TransInfo transaction info
type TransMoveInfo ¶
type TransMoveInfo struct { DstChain uint64 `json:"dst_chain,omitempty"` Cost uint64 `json:"cost,omitempty"` Energy uint64 `json:"energy,omitempty"` TransKey string `json:"trans_key,omitempty"` }
TransMoveInfo move info
type TransferInfo ¶ added in v0.3.9
type TransferInfo struct { Peer string `json:"peer,omitempty"` Cost uint64 `json:"cost,omitempty"` Energy uint64 `json:"energy,omitempty"` TransKey string `json:"trans_key,omitempty"` }
TransferInfo transfer info
type VersionInfo ¶
VersionInfo version info