remove manually added api.go file

This commit is contained in:
Carlosokumu 2024-10-21 11:07:32 +03:00
parent f643aa4d14
commit 367d3f0593
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -1,60 +0,0 @@
package server
type (
OKResponse struct {
Ok bool `json:"ok"`
Description string `json:"description"`
Result map[string]any `json:"result"`
}
ErrResponse struct {
Ok bool `json:"ok"`
Description string `json:"description"`
ErrCode string `json:"errorCode"`
}
TransferRequest struct {
From string `json:"from" validate:"required,eth_addr_checksum"`
To string `json:"to" validate:"required,eth_addr_checksum"`
TokenAddress string `json:"tokenAddress" validate:"required,eth_addr_checksum"`
Amount string `json:"amount" validate:"required,number,gt=0"`
}
PoolSwapRequest struct {
From string `json:"from" validate:"required,eth_addr_checksum"`
FromTokenAddress string `json:"fromTokenAddress" validate:"required,eth_addr_checksum"`
ToTokenAddress string `json:"toTokenAddress" validate:"required,eth_addr_checksum"`
PoolAddress string `json:"poolAddress" validate:"required,eth_addr_checksum"`
Amount string `json:"amount" validate:"required,number,gt=0"`
}
PoolDepositRequest struct {
From string `json:"from" validate:"required,eth_addr_checksum"`
TokenAddress string `json:"tokenAddress" validate:"required,eth_addr_checksum"`
PoolAddress string `json:"poolAddress" validate:"required,eth_addr_checksum"`
Amount string `json:"amount" validate:"required,number,gt=0"`
}
AccountAddressParam struct {
Address string `param:"address" validate:"required,eth_addr_checksum"`
}
TrackingIDParam struct {
TrackingID string `param:"trackingId" validate:"required,uuid"`
}
OTXByAccountRequest struct {
Address string `param:"address" validate:"required,eth_addr_checksum"`
PerPage int `query:"perPage" validate:"required,number,gt=0"`
Cursor int `query:"cursor" validate:"number"`
Next bool `query:"next"`
}
)
const (
ErrCodeInternalServerError = "E01"
ErrCodeInvalidJSON = "E02"
ErrCodeInvalidAPIKey = "E03"
ErrCodeValidationFailed = "E04"
ErrCodeAccountNotExists = "E05"
)