controllers

package
v0.0.0-...-bee63d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddressInWatchList

func AddAddressInWatchList(c *gin.Context)

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

func DeleteAddressInWatchList(c *gin.Context)

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

func GetOneAddressWatchList(c *gin.Context)

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

func GetOneTransaction(c *gin.Context)

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

func GetTransactions(c *gin.Context)

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

func GetWatchList(c *gin.Context)

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 Ping

func Ping(c *gin.Context)

func UpdateAddressInWatchList

func UpdateAddressInWatchList(c *gin.Context)

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL