@@ -13,35 +13,63 @@ import (
1313 "github.com/rs/zerolog/log"
1414)
1515
16+ // Error represents an API error response
17+ // @Description Error represents an API error response
1618type Error struct {
19+ // @Description HTTP status code
1720 Code int `json:"code"`
21+ // @Description Error message
1822 Message string `json:"message"`
23+ // @Description Support ID for tracking the error
1924 SupportId string `json:"support_id"`
2025}
2126
27+ // QueryParams represents the parameters for querying data
28+ // @Description QueryParams represents the parameters for querying data
2229type QueryParams struct {
30+ // @Description Map of filter parameters
2331 FilterParams map [string ]string `schema:"-"`
32+ // @Description Field to group results by
2433 GroupBy string `schema:"group_by"`
34+ // @Description Field to sort results by
2535 SortBy string `schema:"sort_by"`
36+ // @Description Sort order (asc or desc)
2637 SortOrder string `schema:"sort_order"`
38+ // @Description Page number for pagination
2739 Page int `schema:"page"`
40+ // @Description Number of items per page
2841 Limit int `schema:"limit"`
42+ // @Description List of aggregate functions to apply
2943 Aggregates []string `schema:"aggregate"`
3044}
3145
46+ // Meta represents metadata for a query response
47+ // @Description Meta represents metadata for a query response
3248type Meta struct {
33- ChainId uint64 `json:"chain_id"`
49+ // @Description Chain ID of the blockchain
50+ ChainId uint64 `json:"chain_id"`
51+ // @Description Contract address
3452 ContractAddress string `json:"address"`
53+ // @Description Function or event signature
3554 Signature string `json:"signature"`
55+ // @Description Current page number
3656 Page int `json:"page"`
57+ // @Description Number of items per page
3758 Limit int `json:"limit"`
59+ // @Description Total number of items
3860 TotalItems int `json:"total_items"`
61+ // @Description Total number of pages
3962 TotalPages int `json:"total_pages"`
4063}
4164
65+ // QueryResponse represents the response structure for a query
66+ // @Description QueryResponse represents the response structure for a query
4267type QueryResponse struct {
68+ // @Description Metadata for the query response
4369 Meta Meta `json:"meta"`
70+ // @Description Query result data
4471 Data interface {} `json:"data,omitempty"`
72+ // @Description Aggregation results
4573 Aggregations map [string ]string `json:"aggregations,omitempty"`
4674}
4775
0 commit comments