Documentation ¶
Overview ¶
Package restful privides restful server router and handler
Index ¶
- Constants
- func InitRestServer() rest.ApiServer
- type Action
- type Route
- type Router
- func (r *Router) Connect(path string, handler http.HandlerFunc)
- func (r *Router) Delete(path string, handler http.HandlerFunc)
- func (r *Router) Get(path string, handler http.HandlerFunc)
- func (r *Router) Head(path string, handler http.HandlerFunc)
- func (r *Router) Options(path string, handler http.HandlerFunc)
- func (r *Router) Post(path string, handler http.HandlerFunc)
- func (r *Router) Put(path string, handler http.HandlerFunc)
- func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (this *Router) Try(path string, method string) (http.HandlerFunc, paramsMap, error)
Constants ¶
View Source
const ( GET_CONN_COUNT = "/api/v1/node/connectioncount" GET_BLK_TXS_BY_HEIGHT = "/api/v1/block/transactions/height/:height" GET_BLK_BY_HEIGHT = "/api/v1/block/details/height/:height" GET_BLK_BY_HASH = "/api/v1/block/details/hash/:hash" GET_BLK_HEIGHT = "/api/v1/block/height" GET_BLK_HASH = "/api/v1/block/hash/:height" GET_TX = "/api/v1/transaction/:hash" GET_STORAGE = "/api/v1/storage/:hash/:key" GET_BALANCE = "/api/v1/balance/:addr" GET_CONTRACT_STATE = "/api/v1/contract/:hash" GET_SMTCOCE_EVT_TXS = "/api/v1/smartcode/event/transactions/:height" GET_SMTCOCE_EVTS = "/api/v1/smartcode/event/txhash/:hash" GET_BLK_HGT_BY_TXHASH = "/api/v1/block/height/txhash/:hash" GET_MERKLE_PROOF = "/api/v1/merkleproof/:hash" GET_GAS_PRICE = "/api/v1/gasprice" GET_ALLOWANCE = "/api/v1/allowance/:asset/:from/:to" GET_UNBOUNDONG = "/api/v1/unboundong/:addr" GET_GRANTONG = "/api/v1/grantong/:addr" GET_MEMPOOL_TXCOUNT = "/api/v1/mempool/txcount" GET_MEMPOOL_TXSTATE = "/api/v1/mempool/txstate/:hash" GET_VERSION = "/api/v1/version" GET_NETWORKID = "/api/v1/networkid" POST_RAW_TX = "/api/v1/transaction" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.