Documentation
¶
Index ¶
- func BlockHashDecorator(blockHash blockhash.BlockHash, fn func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func FeeRecipientHandler(affiliateService affiliates.AffiliateService) func(http.ResponseWriter, *http.Request)
- func FormatResponse(orders []dbModule.Order, format string, total, page, perPage int) ([]byte, string, error)
- func FormatSingleResponse(order *dbModule.Order, format string) ([]byte, string, error)
- func HealthCheckHandler(db *gorm.DB, blockHash blockhash.BlockHash) func(http.ResponseWriter, *http.Request)
- func OrderBookHandler(db *gorm.DB) func(http.ResponseWriter, *http.Request, types.Pool)
- func OrderHandler(db *gorm.DB) func(http.ResponseWriter, *http.Request)
- func PairHandler(db *gorm.DB) func(http.ResponseWriter, *http.Request)
- func SearchHandler(db *gorm.DB) func(http.ResponseWriter, *http.Request, types.Pool)
- type ApiError
- type FormattedOrder
- type HealthCheck
- type OrderBook
- type OrderMetadata
- type PagedOrders
- type PagedResult
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockHashDecorator ¶
func BlockHashDecorator(blockHash blockhash.BlockHash, fn func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
func FeeRecipientHandler ¶
func FeeRecipientHandler(affiliateService affiliates.AffiliateService) func(http.ResponseWriter, *http.Request)
func FormatResponse ¶
func FormatSingleResponse ¶
func HealthCheckHandler ¶
func OrderBookHandler ¶
func OrderHandler ¶
func PairHandler ¶
func SearchHandler ¶
Types ¶
type ApiError ¶
type ApiError struct { Code int64 `json:"code"` Reason string `json:"reason"` Errors []ValidationError `json:validationErrors` }
type FormattedOrder ¶
type FormattedOrder struct { Order *types.Order `json:"order"` Metadata *OrderMetadata `json:"metaData"` }
func GetFormattedOrder ¶
func GetFormattedOrder(order dbModule.Order) *FormattedOrder
type HealthCheck ¶
type HealthCheck struct {
BlockHash string
}
type OrderBook ¶
type OrderBook struct { Asks *PagedResult `json:"asks"` Bids *PagedResult `json:"bids"` }
type OrderMetadata ¶
type OrderMetadata struct { Hash string `json:"hash"` FeeRate float64 `json:"feeRate"` Status int64 `json:"status"` TakerAssetAmountRemaining string `json:"takerAssetAmountRemaining"` TakerAssetMetadata *dbModule.AssetMetadata `json:"takerAssetMetadata,omitempty"` MakerAssetMetadata *dbModule.AssetMetadata `json:"makerAssetMetadata,omitempty"` }
type PagedOrders ¶
type PagedOrders struct { Total int `json:"total"` Page int `json:"page"` PerPage int `json:"perPage"` Records []FormattedOrder `json:"records"` }
type PagedResult ¶
type PagedResult struct { Total int `json:"total"` Page int `json:"page"` PerPage int `json:"perPage"` Records interface{} `json:"records"` }
func GetPagedResult ¶
func GetPagedResult(total, page, per_page int, records interface{}) *PagedResult
type ValidationError ¶
type ValidationError struct { Err string `json:"reason"` Code int64 `json:"code"` Field string `json:"field"` }
func QueryFilter ¶
Click to show internal directories.
Click to hide internal directories.