Documentation ¶
Index ¶
- func AccountsFiltersStructValidation(sl validator.StructLevel)
- func BidsFiltersStructValidation(sl validator.StructLevel)
- func ExitsFiltersStructValidation(sl validator.StructLevel)
- func ParseAccountFilter(c *gin.Context) (common.QueryAccount, error)
- func ParseAccountsFilters(c *gin.Context, v *validator.Validate) (historydb.GetAccountsAPIRequest, error)
- func ParseBatchFilter(c *gin.Context) (*uint, error)
- func ParseBatchesFilter(c *gin.Context) (historydb.GetBatchesAPIRequest, error)
- func ParseBidsFilters(c *gin.Context, v *validator.Validate) (historydb.GetBidsAPIRequest, error)
- func ParseCoordinatorsFilters(c *gin.Context) (historydb.GetCoordinatorsAPIRequest, error)
- func ParseCurrenciesFilters(c *gin.Context) ([]string, error)
- func ParseCurrencyFilter(c *gin.Context) (string, error)
- func ParseExitFilter(c *gin.Context) (*uint, *common.Idx, error)
- func ParseExitsFilters(c *gin.Context, v *validator.Validate) (historydb.GetExitsAPIRequest, error)
- func ParseGetAccountCreationAuthFilter(c *gin.Context) (*ethCommon.Address, error)
- func ParseParamAtomicGroupID(c *gin.Context) (common.AtomicGroupID, error)
- type AccountFilter
- type AccountsFilters
- type AtomicGroupFilter
- type BatchFilter
- type BatchesFilters
- type BidsFilters
- type CoordinatorsFilters
- type CurrenciesFilters
- type CurrencyFilter
- type ExitFilter
- type ExitsFilters
- type GetAccountCreationAuthFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountsFiltersStructValidation ¶
func AccountsFiltersStructValidation(sl validator.StructLevel)
AccountsFiltersStructValidation validates AccountsFilters
func BidsFiltersStructValidation ¶
func BidsFiltersStructValidation(sl validator.StructLevel)
BidsFiltersStructValidation func for bids filters validation
func ExitsFiltersStructValidation ¶
func ExitsFiltersStructValidation(sl validator.StructLevel)
ExitsFiltersStructValidation func validates ExitsFilters
func ParseAccountFilter ¶
func ParseAccountFilter(c *gin.Context) (common.QueryAccount, error)
ParseAccountFilter parses account filter to the account index
func ParseAccountsFilters ¶
func ParseAccountsFilters(c *gin.Context, v *validator.Validate) (historydb.GetAccountsAPIRequest, error)
ParseAccountsFilters parsing /accounts query params to GetAccountsAPIRequest
func ParseBatchFilter ¶
ParseBatchFilter parsing /batches request to the batch num
func ParseBatchesFilter ¶
func ParseBatchesFilter(c *gin.Context) (historydb.GetBatchesAPIRequest, error)
ParseBatchesFilter parsing batches filter to the GetBatchesAPIRequest
func ParseBidsFilters ¶
func ParseBidsFilters(c *gin.Context, v *validator.Validate) (historydb.GetBidsAPIRequest, error)
ParseBidsFilters function for parsing bids filters from the request /bids to the GetBidsAPIRequest
func ParseCoordinatorsFilters ¶
func ParseCoordinatorsFilters(c *gin.Context) (historydb.GetCoordinatorsAPIRequest, error)
ParseCoordinatorsFilters func for parsing coordinator filters from the /coordinators request
func ParseCurrenciesFilters ¶
ParseCurrenciesFilters func for parsing currencies filters from query to the symbols
func ParseCurrencyFilter ¶
ParseCurrencyFilter func for parsing currency filter from uri to the symbol
func ParseExitFilter ¶
ParseExitFilter func parsing exit filter from the /exits request to the accountIndex and batchNum
func ParseExitsFilters ¶
func ParseExitsFilters(c *gin.Context, v *validator.Validate) (historydb.GetExitsAPIRequest, error)
ParseExitsFilters func parsing exits filters
func ParseGetAccountCreationAuthFilter ¶
ParseGetAccountCreationAuthFilter parsing uri request to the eth address
func ParseParamAtomicGroupID ¶
func ParseParamAtomicGroupID(c *gin.Context) (common.AtomicGroupID, error)
ParseParamAtomicGroupID func for parsing AtomicGroupID
Types ¶
type AccountFilter ¶
type AccountFilter struct {
AccountIndex string `uri:"accountIndex" binding:"required"`
}
AccountFilter for parsing /accounts/{accountIndex} request to struct
type AccountsFilters ¶
type AccountsFilters struct { IDs string `form:"tokenIds"` Addr string `form:"cbEthereumAddress"` Bjj string `form:"BJJ"` Pagination }
AccountsFilters for parsing /accounts query params to struct
type AtomicGroupFilter ¶
type AtomicGroupFilter struct {
ID string `uri:"id" binding:"required"`
}
AtomicGroupFilter struct for filtering atomic group request
type BatchFilter ¶
type BatchFilter struct {
BatchNum uint `uri:"batchNum" binding:"required"`
}
BatchFilter struct to hold batch num from request /batches/:batchNum
type BatchesFilters ¶
type BatchesFilters struct { MinBatchNum *uint `form:"minBatchNum"` MaxBatchNum *uint `form:"maxBatchNum"` SlotNum *uint `form:"slotNum"` ForgerAddr string `form:"forgerAddr"` Pagination }
BatchesFilters struct to hold batch num from request /batches/:batchNum
type BidsFilters ¶
type BidsFilters struct { SlotNum *int64 `form:"slotNum" binding:"omitempty,min=0"` BidderAddr string `form:"bidderAddr"` Pagination }
BidsFilters struct to hold bids filters
type CoordinatorsFilters ¶
type CoordinatorsFilters struct { BidderAddr string `form:"bidderAddr"` ForgerAddr string `form:"forgerAddr"` Pagination }
CoordinatorsFilters struct to get coordinator query params from /coordinators request
type CurrenciesFilters ¶
type CurrenciesFilters struct {
Symbols string `form:"symbols"`
}
CurrenciesFilters struct to get query params from /currencies request
type CurrencyFilter ¶
type CurrencyFilter struct {
Symbol string `uri:"symbol" binding:"required"`
}
CurrencyFilter struct to get uri param from /currencies/:symbol request
type ExitFilter ¶
type ExitFilter struct { BatchNum uint `uri:"batchNum" binding:"required"` AccountIndex string `uri:"accountIndex" binding:"required"` }
ExitFilter struct to hold exit filter
type ExitsFilters ¶
type ExitsFilters struct { TokenID *uint `form:"tokenId"` Addr string `form:"cbEthereumAddress"` Bjj string `form:"BJJ"` AccountIndex string `form:"accountIndex"` BatchNum *uint `form:"batchNum"` OnlyPendingWithdraws *bool `form:"onlyPendingWithdraws"` Pagination }
ExitsFilters struct for holding exits filters
type GetAccountCreationAuthFilter ¶
type GetAccountCreationAuthFilter struct {
Addr string `uri:"cbEthereumAddress" binding:"required"`
}
GetAccountCreationAuthFilter struct for parsing cbEthereumAddress from /account-creation-authorization/:cbEthereumAddress request