当前位置: 首页>>代码示例>>Golang>>正文


Golang Engine.DELETE方法代码示例

本文整理汇总了Golang中github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/gin-gonic/gin.Engine.DELETE方法的典型用法代码示例。如果您正苦于以下问题:Golang Engine.DELETE方法的具体用法?Golang Engine.DELETE怎么用?Golang Engine.DELETE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/gin-gonic/gin.Engine的用法示例。


在下文中一共展示了Engine.DELETE方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Start

// Starting the server means registering all the handlers with the router.
func (this *RestServer) Start(config *server.ServerConfig, router *gin.Engine) {
	// Accounts
	router.GET("/accounts", parseSearchQuery, this.handleAccounts)
	router.GET("/accounts/:address", addressParam, this.handleAccount)
	router.GET("/accounts/:address/storage", addressParam, this.handleStorage)
	router.GET("/accounts/:address/storage/:key", addressParam, keyParam, this.handleStorageAt)
	// Blockchain
	router.GET("/blockchain", this.handleBlockchainInfo)
	router.GET("/blockchain/chain_id", this.handleChainId)
	router.GET("/blockchain/genesis_hash", this.handleGenesisHash)
	router.GET("/blockchain/latest_block_height", this.handleLatestBlockHeight)
	router.GET("/blockchain/latest_block", this.handleLatestBlock)
	router.GET("/blockchain/blocks", parseSearchQuery, this.handleBlocks)
	router.GET("/blockchain/block/:height", heightParam, this.handleBlock)
	// Consensus
	router.GET("/consensus", this.handleConsensusState)
	router.GET("/consensus/validators", this.handleValidatorList)
	// Events
	router.POST("/event_subs", this.handleEventSubscribe)
	router.GET("/event_subs/:id", this.handleEventPoll)
	router.DELETE("/event_subs/:id", this.handleEventUnsubscribe)
	// NameReg
	router.GET("/namereg", parseSearchQuery, this.handleNameRegEntries)
	router.GET("/namereg/:key", nameParam, this.handleNameRegEntry)
	// Network
	router.GET("/network", this.handleNetworkInfo)
	router.GET("/network/client_version", this.handleClientVersion)
	router.GET("/network/moniker", this.handleMoniker)
	router.GET("/network/listening", this.handleListening)
	router.GET("/network/listeners", this.handleListeners)
	router.GET("/network/peers", this.handlePeers)
	router.GET("/network/peers/:address", peerAddressParam, this.handlePeer)
	// Tx related (TODO get txs has still not been implemented)
	router.POST("/txpool", this.handleBroadcastTx)
	router.GET("/txpool", this.handleUnconfirmedTxs)
	// Code execution
	router.POST("/calls", this.handleCall)
	router.POST("/codecalls", this.handleCallCode)
	// Unsafe
	router.GET("/unsafe/pa_generator", this.handleGenPrivAcc)
	router.POST("/unsafe/txpool", parseTxModifier, this.handleTransact)
	router.POST("/unsafe/namereg/txpool", this.handleTransactNameReg)
	router.POST("/unsafe/tx_signer", this.handleSignTx)
	this.running = true
}
开发者ID:alexandrev,项目名称:eris-db,代码行数:46,代码来源:restServer.go


注:本文中的github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/gin-gonic/gin.Engine.DELETE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。