@@ -65,141 +65,9 @@ func init() {
65
65
docs .SwaggerInfo .BasePath = BasePath
66
66
}
67
67
68
- // dashboardHandler godoc
69
- //
70
- // @Summary Statistics dashboard
71
- // @Description Query statistics dashboard includes `storage fee` and `log sync height`
72
- // @Tags (deprecated)statistic
73
- // @Produce json
74
- // @Success 200 {object} api.BusinessError{Data=Dashboard}
75
- // @Failure 600 {object} api.BusinessError
76
- // @Router /statistic/dashboard [get]
77
- func dashboardHandler (c * gin.Context ) {
78
- api .Wrap (dashboard )(c )
79
- }
80
-
81
- // listTxStatHandler godoc
82
- //
83
- // @Summary Transaction statistics
84
- // @Description Query transaction statistics, including incremental and full data, and support querying at hourly or daily time intervals
85
- // @Tags (deprecated)statistic
86
- // @Accept json
87
- // @Produce json
88
- // @Param skip query int false "The number of skipped records, usually it's pageSize * (pageNumber - 1)" minimum(0) default(0)
89
- // @Param limit query int false "The number of records displayed on the page" minimum(1) maximum(2000) default(10)
90
- // @Param minTimestamp query int false "Timestamp in seconds"
91
- // @Param maxTimestamp query int false "Timestamp in seconds"
92
- // @Param intervalType query string false "Statistics interval" Enums(hour, day) default(day)
93
- // @Param sort query string false "Sort by timestamp" Enums(asc, desc) default(desc)
94
- // @Success 200 {object} api.BusinessError{Data=TxStatList}
95
- // @Failure 600 {object} api.BusinessError
96
- // @Router /statistic/transaction/list [get]
97
- func listTxStatHandler (c * gin.Context ) {
98
- api .Wrap (listTxStat )(c )
99
- }
100
-
101
- // listDataStatHandler godoc
102
- //
103
- // @Summary Data storage statistics
104
- // @Description Query data storage statistics, including incremental and full data, and support querying at hourly or daily time intervals
105
- // @Tags (deprecated)statistic
106
- // @Accept json
107
- // @Produce json
108
- // @Param skip query int false "The number of skipped records, usually it's pageSize * (pageNumber - 1)" minimum(0) default(0)
109
- // @Param limit query int false "The number of records displayed on the page" minimum(1) maximum(2000) default(10)
110
- // @Param minTimestamp query int false "Timestamp in seconds"
111
- // @Param maxTimestamp query int false "Timestamp in seconds"
112
- // @Param intervalType query string false "Statistics interval" Enums(hour, day) default(day)
113
- // @Param sort query string false "Sort by timestamp" Enums(asc, desc) default(desc)
114
- // @Success 200 {object} api.BusinessError{Data=DataStatList}
115
- // @Failure 600 {object} api.BusinessError
116
- // @Router /statistic/storage/list [get]
117
- func listDataStatHandler (c * gin.Context ) {
118
- api .Wrap (listDataStat )(c )
119
- }
120
-
121
- // listFeeStatHandler godoc
122
- //
123
- // @Summary fee statistics
124
- // @Description Query fee statistics, including incremental and full data, and support querying at hourly or daily time intervals
125
- // @Tags (deprecated)statistic
126
- // @Accept json
127
- // @Produce json
128
- // @Param skip query int false "The number of skipped records, usually it's pageSize * (pageNumber - 1)" minimum(0) default(0)
129
- // @Param limit query int false "The number of records displayed on the page" minimum(1) maximum(2000) default(10)
130
- // @Param minTimestamp query int false "Timestamp in seconds"
131
- // @Param maxTimestamp query int false "Timestamp in seconds"
132
- // @Param intervalType query string false "Statistics interval" Enums(hour, day) default(day)
133
- // @Param sort query string false "Sort by timestamp" Enums(asc, desc) default(desc)
134
- // @Success 200 {object} api.BusinessError{Data=FeeStatList}
135
- // @Failure 600 {object} api.BusinessError
136
- // @Router /statistic/fee/list [get]
137
- func listFeeStatHandler (c * gin.Context ) {
138
- api .Wrap (listFeeStat )(c )
139
- }
140
-
141
- // listTxHandler godoc
142
- //
143
- // @Summary Layer2 transaction list
144
- // @Description Query layer2 transactions, support address and root hash filter
145
- // @Tags (deprecated)transaction
146
- // @Accept json
147
- // @Produce json
148
- // @Param skip query int false "The number of skipped records, usually it's pageSize * (pageNumber - 1)" minimum(0) default(0)
149
- // @Param limit query int false "The number of records displayed on the page" minimum(1) maximum(100) default(10)
150
- // @Param address query string false "The submitter address of the uploaded file"
151
- // @Param rootHash query string false "The merkle root hash of the uploaded file"
152
- // @Success 200 {object} api.BusinessError{Data=TxList}
153
- // @Failure 600 {object} api.BusinessError
154
- // @Router /transaction/list [get]
155
- func listTxHandler (c * gin.Context ) {
156
- api .Wrap (listTx )(c )
157
- }
158
-
159
- // getTxBriefHandler godoc
160
- //
161
- // @Summary Layer2 transaction overview
162
- // @Description Query layer2 transaction overview by txSeq
163
- // @Tags (deprecated)transaction
164
- // @Accept json
165
- // @Produce json
166
- // @Param txSeq query string true "Lay2 transaction sequence number"
167
- // @Success 200 {object} api.BusinessError{Data=TxBrief}
168
- // @Failure 600 {object} api.BusinessError
169
- // @Router /transaction/brief [get]
170
- func getTxBriefHandler (c * gin.Context ) {
171
- api .Wrap (getTxBrief )(c )
172
- }
173
-
174
- // getTxDetailHandler godoc
175
- //
176
- // @Summary Layer2 transaction advanced info
177
- // @Description Query layer2 transaction advanced info by txSeq
178
- // @Tags (deprecated)transaction
179
- // @Accept json
180
- // @Produce json
181
- // @Param txSeq query string true "Lay2 transaction sequence number"
182
- // @Success 200 {object} api.BusinessError{Data=TxDetail}
183
- // @Failure 600 {object} api.BusinessError
184
- // @Router /transaction/detail [get]
185
- func getTxDetailHandler (c * gin.Context ) {
186
- api .Wrap (getTxDetail )(c )
187
- }
188
-
189
68
func RegisterRouter (router * gin.Engine ) {
190
69
apiRoute := router .Group (BasePath )
191
70
192
- statRoute := apiRoute .Group ("/statistic" )
193
- statRoute .GET ("dashboard" , dashboardHandler )
194
- statRoute .GET ("transaction/list" , listTxStatHandler )
195
- statRoute .GET ("storage/list" , listDataStatHandler )
196
- statRoute .GET ("fee/list" , listFeeStatHandler )
197
-
198
- txRoute := apiRoute .Group ("/transaction" )
199
- txRoute .GET ("list" , listTxHandler )
200
- txRoute .GET ("brief" , getTxBriefHandler )
201
- txRoute .GET ("detail" , getTxDetailHandler )
202
-
203
71
statsRoute := apiRoute .Group ("/stats" )
204
72
statsRoute .GET ("summary" , summaryHandler )
205
73
statsRoute .GET ("layer1-tx" , listTxStatsHandler )
0 commit comments