Documentation ¶
Index ¶
- func Balance(c *gin.Context)
- func BalanceDetailed(c *gin.Context)
- func BlockChain(c *gin.Context)
- func Cors() gin.HandlerFunc
- func DemoData(context *gin.Context)
- func Entry(c *gin.Context)
- func Register(c *gin.Context)
- func RegisterInfo(c *gin.Context)
- func Root(c *gin.Context)
- func Runserver()
- func TeaData(context *gin.Context)
- func Transaction(c *gin.Context)
- func Transactionlist(c *gin.Context)
- func Users(context *gin.Context)
- func Version(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Balance ¶
@Summary 余额 @Description 返回指定用户的余额信息 @Tags 前端 @Param address query string true "Ivan" @Success 200 {object} gin.H @Router /balance [get]
func BalanceDetailed ¶
@Summary 余额明细 @Description 返回指定地址的交易明细 @Tags 前端 @Param address query string true "Ivan" @Success 200 {object} gin.H @Router /balancedetailed [get]
func BlockChain ¶
@Summary 当前区块链数据 @Description 用于同步本地区块链数据 @Tags 服务端 @Success 200 {object} gin.H "{"statuc":"ok", "databyte":"bytesdata"}" @Router /blockchain [post]
func Cors ¶
func Cors() gin.HandlerFunc
func Entry ¶
@Summary 数据录入 @Description 生产茶叶数据, 用于交易 @Tags 前端 @Param address formData string true "Ivan" @Param amount formData int true "5000" @Param data formData string true "json" @Success 200 {object} gin.H {"statuc":"ok", "data":""} @Failure 400 {object} gin.H {"statuc":"error", "message":"失败原因"} @Router /entry [post]
func Register ¶
@Summary 注册服务器到中心服务器中 @Description 注册当前服务器信息到中心服务器中 @Tags 服务端 @Param mode formData int true "5000" @Success 200 {object} gin.H "{"statuc":"ok"}" @Router /register [get]
func RegisterInfo ¶
@Summary 返回注册信息 @Description 返回指当前所有的注册信息 @Tags 服务端 @Success 200 {object} gin.H "{"statuc":"ok", "addres": []}" @Router /registerinfo [get]
func TeaData ¶
@Summary 茶叶数据 @Description 获取指定地址的茶叶数据 @Tags 前端 @Param address formData string true "ASHASDSABDKJQWFKJBASFKAF" @Success 200 {object} gin.H {"statuc":"ok", "data":""} @Failure 400 {object} gin.H {"statuc":"error", "message":"失败原因"} @Router /teadata [post]
func Transaction ¶
@Summary 茶叶交易 @Description 用于两个不同地址之间的数据交易 @Tags 前端 @Param from formData string true "Ivan" @Param to formData string true "Ble" @Param amount formData int true "300" @Param data formData string false "{}" @Success 200 {object} gin.H {"statuc":"ok"} @Failure 400 {object} gin.H {"statuc":"error", "data":"失败原因"} @Router /transaction [post]
func Transactionlist ¶
@Summary 区块链数据 @Description 返回当前区块链里的所有交易数据 @Tags Demo @Success 200 {object} gin.H "{"data":{}}" @Router /transactionlist [get]
Types ¶
This section is empty.