Documentation ¶
Index ¶
- func AddAddressInWatchList(c *gin.Context)
- func DeleteAddressInWatchList(c *gin.Context)
- func GetOneAddressWatchList(c *gin.Context)
- func GetOneTransaction(c *gin.Context)
- func GetTransactions(c *gin.Context)
- func GetWatchList(c *gin.Context)
- func Ping(c *gin.Context)
- func UpdateAddressInWatchList(c *gin.Context)
- type NewAddressInWatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAddressInWatchList ¶
Ping godoc @Summary add an address in watch list @Description add an address in watch list @Tags watch-list @Accept */* @Produce json @Param address body models.NewAddressInWatch true "new address to watch" @Success 201 {object} models.WatchList @Failure 400 {object} models.Error @Router /watch-list [post]
func DeleteAddressInWatchList ¶
Ping godoc @Summary delete an address in watch list @Description delete an address in watch list @Tags watch-list @Accept */* @Produce json @Param addressId path string true "address ID to delete" @Success 200 {object} nil @Failure 404 {object} models.Error "address {addressId} not found in watch list" @Router /watch-list/{addressId} [delete]
func GetOneAddressWatchList ¶
Ping godoc @Summary get single address in watch list @Description get single address in watch list @Tags watch-list @Accept */* @Produce json @Param address path string true "address in watch list" @Success 200 {object} models.WatchList @Failure 404 {object} models.Error "address {address} not found in watch list" @Router /watch-list/{address} [get]
func GetOneTransaction ¶
Ping godoc @Summary get single transaction @Description get single transaction @Tags transactions @Accept */* @Produce json @Param hash path string true "transaction hash" @Success 200 {object} models.Transaction @Failure 404 {object} models.Error "no transaction with hash: {hash} found" @Router /transactions/{hash} [get]
func GetTransactions ¶
Ping godoc @Summary get transactions @Description get transactions list @Tags transactions @Accept */* @Produce json @Success 200 {object} []models.Transaction @Failure 404 {object} models.Error "no transactions found" @Router /transactions [get]
func GetWatchList ¶
Ping godoc @Summary get watch list @Description get watch list list @Tags watch-list @Accept */* @Produce json @Success 200 {object} []models.WatchList @Failure 404 {object} models.Error "no address in watch list found" @Router /watch-list [get]
func UpdateAddressInWatchList ¶
Ping godoc @Summary add an address in watch list @Description add an address in watch list @Tags watch-list @Accept */* @Produce json @Param addressId path string true "address ID to update" @Param address body models.NewAddressInWatch true "address to update in watch list" @Success 200 {object} models.WatchList @Failure 400 {object} models.Error @Failure 404 {object} models.Error "address {addressId} not found in watch list" @Router /watch-list/{addressId} [put]
Types ¶
type NewAddressInWatch ¶
type NewAddressInWatch struct {
Address string `json:"address"`
}