Documentation ¶
Index ¶
- Constants
- func AmountToWei(amount float64, decimal *big.Int) (*big.Int, error)
- func GetUserIdFromClaims(ctx *gin.Context) (uint, error)
- func ImportIdToRequestId(importId int) string
- func JoinList[T any](list []T, sep string) string
- func NewError(key string, err error) map[string]interface{}
- func Paginate(page, pageSize int) func(db *gorm.DB) *gorm.DB
- func RandomAddress() common.Address
- func RemoveFromList[T any](list []T, index int) []T
- func RequestIdToImportId(requestId string) int
- func RespondError(w *gin.Context, status int, msg string, errors ...error)
- func RespondErrors(w *gin.Context, status int, payload interface{})
- func RespondJSON(w *gin.Context, status int, payload interface{}, isCached bool)
- func UserAmountToWei(amount string, decimal *big.Int) (*big.Int, error)
- type Channel
- type ErrorMap
- type GeneralError
- type ReceiptSt
- type ResponseData
- type ResponseError
- type TxInfo
Constants ¶
View Source
const ( SUCCESS = 1 FAILED = 0 PENDING = 2 TXTYPE_REWARD_SHIPPING = 3 TXTYPE_SELLER_WITHDRAW = 4 TIMEOUT = 5 )
View Source
const IMPORT_ID_PREFIX string = "import_id:"
Variables ¶
This section is empty.
Functions ¶
func AmountToWei ¶
Astra amount to Wei
func ImportIdToRequestId ¶
func RandomAddress ¶
func RemoveFromList ¶
func RequestIdToImportId ¶
func RespondErrors ¶
Types ¶
type Channel ¶
func NewChannel ¶
func NewChannel() *Channel
type GeneralError ¶
type ResponseData ¶
type ResponseError ¶
type ResponseError struct { Status int `json:"status"` Errors interface{} `json:"errors"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.