From 367d3f0593c4ed5621a32e4187bfb0558be200ac Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Mon, 21 Oct 2024 11:07:32 +0300 Subject: [PATCH] remove manually added api.go file --- internal/handlers/server/api.go | 60 --------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 internal/handlers/server/api.go diff --git a/internal/handlers/server/api.go b/internal/handlers/server/api.go deleted file mode 100644 index 646458c..0000000 --- a/internal/handlers/server/api.go +++ /dev/null @@ -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" -)