response

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR   = 500
	SUCCESS = 200
)

Variables

This section is empty.

Functions

func Fail

func Fail(c *gin.Context)

func FailWithDetailed

func FailWithDetailed(data interface{}, message string, c *gin.Context)

func FailWithMessage

func FailWithMessage(message string, c *gin.Context)

func Ok

func Ok(c *gin.Context)

func OkWithData

func OkWithData(data interface{}, c *gin.Context)

func OkWithDetailed

func OkWithDetailed(data interface{}, message string, c *gin.Context)

func OkWithMessage

func OkWithMessage(message string, c *gin.Context)

func Result

func Result(code int, data interface{}, msg string, c *gin.Context)

Types

type BalanceShow

type BalanceShow struct {
	Symbol  string `json:"symbol"`
	Balance string `json:"balance"`
}

type BscResult

type BscResult struct {
	Status  string     `json:"status"`
	Message string     `json:"message"`
	Result  []TxResult `json:"result"`
}

type NftResult

type NftResult struct {
	TokenId     string `json:"token_id"`
	BlockNumber string `json:"block_number"`
	TokenUri    string `json:"token_uri"`
	Metadata    string `json:"metadata"`
}

type NftResults

type NftResults struct {
	Total    int         `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"page_size"`
	Cursor   string      `json:"cursor"`
	Results  []NftResult `json:"result"`
}

type NftType

type NftType struct {
	Name   string `json:"name"`
	Amount int    `json:"amount"`
}

type Response

type Response struct {
	Code int         `json:"code"`
	Data interface{} `json:"data"`
	Msg  string      `json:"message"`
}

type TxResult

type TxResult struct {
	Hash        string `json:"hash"`
	TimeStamp   string `json:"timeStamp"`
	BlockNumber string `json:"blockNumber"`
	BlockHash   string `json:"blockHash"`
	From        string `json:"from"`
	To          string `json:"to"`
	Value       string `json:"value"`
	Input       string `json:"input"`
	Type        string `json:"type"`
}

Jump to

Keyboard shortcuts

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