Documentation ¶
Index ¶
- func AccountsFiltersStructValidation(sl validator.StructLevel)
- func BidsFiltersStructValidation(sl validator.StructLevel)
- func ExitsFiltersStructValidation(sl validator.StructLevel)
- func HistoryTxsFiltersStructValidation(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 ParseHistoryTxFilter(c *gin.Context) (common.TxID, error)
- func ParseHistoryTxsFilters(c *gin.Context, v *validator.Validate) (historydb.GetTxsAPIRequest, error)
- func ParseParamAtomicGroupID(c *gin.Context) (common.AtomicGroupID, error)
- func ParsePoolTxFilter(c *gin.Context) (common.TxID, error)
- func ParsePoolTxUpdateByIdxAndNonceFilter(c *gin.Context) (common.Idx, nonce.Nonce, error)
- func ParsePoolTxsFilters(c *gin.Context, v *validator.Validate) (l2db.GetPoolTxsAPIRequest, error)
- func ParseSlotFilter(c *gin.Context) (*uint, error)
- func ParseSlotsFilters(c *gin.Context, v *validator.Validate) (historydb.GetBestBidsAPIRequest, error)
- func ParseTokenFilter(c *gin.Context) (*uint, error)
- func ParseTokensFilters(c *gin.Context) (historydb.GetTokensAPIRequest, error)
- func PoolTxsTxsFiltersStructValidation(sl validator.StructLevel)
- func SlotsFiltersStructValidation(sl validator.StructLevel)
- type AccountFilter
- type AccountsFilters
- type AtomicGroupFilter
- type BatchFilter
- type BatchesFilters
- type BidsFilters
- type CoordinatorsFilters
- type CurrenciesFilters
- type CurrencyFilter
- type ExitFilter
- type ExitsFilters
- type GetAccountCreationAuthFilter
- type HistoryTxFilter
- type HistoryTxsFilters
- type Pagination
- type PoolTxFilter
- type PoolTxUpdateByIdxAndNonceFilter
- type PoolTxsFilters
- type SlotFilter
- type SlotsFilters
- type TokenFilter
- type TokensFilters
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 HistoryTxsFiltersStructValidation ¶
func HistoryTxsFiltersStructValidation(sl validator.StructLevel)
HistoryTxsFiltersStructValidation func to validate history txs filters
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 ParseHistoryTxFilter ¶
ParseHistoryTxFilter function for parsing history tx filter to the txID
func ParseHistoryTxsFilters ¶
func ParseHistoryTxsFilters(c *gin.Context, v *validator.Validate) (historydb.GetTxsAPIRequest, error)
ParseHistoryTxsFilters func to parse history txs filters from query to the GetTxsAPIRequest
func ParseParamAtomicGroupID ¶ added in v1.6.0
func ParseParamAtomicGroupID(c *gin.Context) (common.AtomicGroupID, error)
ParseParamAtomicGroupID func for parsing AtomicGroupID
func ParsePoolTxFilter ¶
ParsePoolTxFilter func for parsing tx filter to the transaction id
func ParsePoolTxUpdateByIdxAndNonceFilter ¶ added in v1.7.0
ParsePoolTxUpdateByIdxAndNonceFilter func for parsing pool tx update by idx and nonce filter to the account index and nonce
func ParsePoolTxsFilters ¶
func ParsePoolTxsFilters(c *gin.Context, v *validator.Validate) (l2db.GetPoolTxsAPIRequest, error)
ParsePoolTxsFilters func to parse pool txs filters from the /transactions-pool request to the GetPoolTxsAPIRequest
func ParseSlotFilter ¶
ParseSlotFilter func to parse slot filter from uri to the slot number
func ParseSlotsFilters ¶
func ParseSlotsFilters(c *gin.Context, v *validator.Validate) (historydb.GetBestBidsAPIRequest, error)
ParseSlotsFilters func for parsing slots filters to the GetBestBidsAPIRequest
func ParseTokenFilter ¶
ParseTokenFilter for parsing token filter from uri to the id
func ParseTokensFilters ¶
func ParseTokensFilters(c *gin.Context) (historydb.GetTokensAPIRequest, error)
ParseTokensFilters function for parsing tokens filters to the GetTokensAPIRequest
func PoolTxsTxsFiltersStructValidation ¶
func PoolTxsTxsFiltersStructValidation(sl validator.StructLevel)
PoolTxsTxsFiltersStructValidation func for pool txs query params validation
func SlotsFiltersStructValidation ¶ added in v1.6.0
func SlotsFiltersStructValidation(sl validator.StructLevel)
SlotsFiltersStructValidation func validating filters struct
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:"hezEthereumAddress"` Bjj string `form:"BJJ"` Pagination }
AccountsFilters for parsing /accounts query params to struct
type AtomicGroupFilter ¶ added in v1.6.0
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:"hezEthereumAddress"` 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:"hezEthereumAddress" binding:"required"`
}
GetAccountCreationAuthFilter struct for parsing hezEthereumAddress from /account-creation-authorization/:hezEthereumAddress request
type HistoryTxFilter ¶
type HistoryTxFilter struct {
TxID string `uri:"id" binding:"required"`
}
HistoryTxFilter struct to get history tx uri param from /transaction-history/:id request
type HistoryTxsFilters ¶
type HistoryTxsFilters struct { TokenID *uint `form:"tokenId"` HezEthereumAddr string `form:"hezEthereumAddress"` FromHezEthereumAddr string `form:"fromHezEthereumAddress"` ToHezEthereumAddr string `form:"toHezEthereumAddress"` Bjj string `form:"BJJ"` ToBjj string `form:"toBJJ"` FromBjj string `form:"fromBJJ"` AccountIndex string `form:"accountIndex"` FromAccountIndex string `form:"fromAccountIndex"` ToAccountIndex string `form:"toAccountIndex"` BatchNum *uint `form:"batchNum"` TxType string `form:"type"` IncludePendingTxs *bool `form:"includePendingL1s"` Pagination }
HistoryTxsFilters struct for holding filters from the /transaction-history request
type Pagination ¶
type Pagination struct { FromItem *uint `form:"fromItem"` Order *string `form:"order,default=ASC" binding:"omitempty,oneof=ASC DESC"` Limit *uint `form:"limit,default=20" binding:"omitempty,min=1,max=2049"` }
Pagination type for holding pagination params
type PoolTxFilter ¶
type PoolTxFilter struct {
TxID string `uri:"id" binding:"required"`
}
PoolTxFilter struct to get uri param from /transactions-pool/:id request
type PoolTxUpdateByIdxAndNonceFilter ¶ added in v1.7.0
type PoolTxUpdateByIdxAndNonceFilter struct { AccountIndex string `uri:"accountIndex" binding:"required"` Nonce *uint `uri:"nonce" binding:"required"` }
PoolTxUpdateByIdxAndNonceFilter struct to get uri param from /transactions-pool/accounts/:accountIndex/nonces/:nonce request
type PoolTxsFilters ¶
type PoolTxsFilters struct { TokenID *uint `form:"tokenId"` HezEthereumAddr string `form:"hezEthereumAddress"` FromHezEthereumAddr string `form:"fromHezEthereumAddress"` ToHezEthereumAddr string `form:"toHezEthereumAddress"` Bjj string `form:"BJJ"` FromBjj string `form:"fromBJJ"` ToBjj string `form:"toBJJ"` AccountIndex string `form:"accountIndex"` FromAccountIndex string `form:"fromAccountIndex"` ToAccountIndex string `form:"toAccountIndex"` TxType string `form:"type"` State string `form:"state"` Pagination }
PoolTxsFilters struct for holding query params from /transactions-pool request
type SlotFilter ¶
type SlotFilter struct {
SlotNum *uint `uri:"slotNum" binding:"required"`
}
SlotFilter struct to get slot filter uri param from /slots/:slotNum request
type SlotsFilters ¶
type SlotsFilters struct { MinSlotNum *int64 `form:"minSlotNum" binding:"omitempty,min=0"` MaxSlotNum *int64 `form:"maxSlotNum" binding:"omitempty,min=0"` WonByEthereumAddress string `form:"wonByEthereumAddress"` FinishedAuction *bool `form:"finishedAuction"` Pagination }
SlotsFilters struct to get slots filters from query params from /slots request
type TokenFilter ¶
type TokenFilter struct {
ID *uint `uri:"id" binding:"required"`
}
TokenFilter struct to get token uri param from /tokens/:id request
type TokensFilters ¶
type TokensFilters struct { IDs string `form:"ids"` Symbols string `form:"symbols"` Name string `form:"name"` Addresses string `form:"addresses"` Pagination }
TokensFilters struct to get token query params from /tokens request