Skip to content

Commit 9f5d443

Browse files
committed
chore: update docs
1 parent 6893226 commit 9f5d443

File tree

3 files changed

+377
-0
lines changed

3 files changed

+377
-0
lines changed

docs/docs.go

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,61 @@ const docTemplate = `{
4242
}
4343
}
4444
},
45+
"/objects": {
46+
"get": {
47+
"description": "Retrieves a paginated list of all tracked object IDs from the database.",
48+
"consumes": [
49+
"application/json"
50+
],
51+
"produces": [
52+
"application/json"
53+
],
54+
"tags": [
55+
"objects"
56+
],
57+
"summary": "Get All Object IDs",
58+
"parameters": [
59+
{
60+
"type": "integer",
61+
"description": "Number of items per page (default: 20, max: 1000)",
62+
"name": "limit",
63+
"in": "query"
64+
},
65+
{
66+
"type": "integer",
67+
"description": "Number of items to skip (default: 0)",
68+
"name": "offset",
69+
"in": "query"
70+
}
71+
],
72+
"responses": {
73+
"200": {
74+
"description": "Paginated list of object IDs",
75+
"schema": {
76+
"$ref": "#/definitions/database.GetAllObjectIDsResult"
77+
}
78+
},
79+
"400": {
80+
"description": "Invalid query parameters",
81+
"schema": {
82+
"type": "object",
83+
"additionalProperties": {
84+
"type": "string"
85+
}
86+
}
87+
},
88+
"500": {
89+
"description": "Internal server error",
90+
"schema": {
91+
"type": "object",
92+
"additionalProperties": {
93+
"type": "string"
94+
}
95+
}
96+
}
97+
}
98+
}
99+
},
45100
"/objects/{id}": {
46101
"get": {
47102
"description": "Retrieves an object by its ID from the database with key-value pairs. Optionally specify a timestamp to get historical state.",
@@ -107,6 +162,89 @@ const docTemplate = `{
107162
}
108163
}
109164
}
165+
},
166+
"/statistics/costs": {
167+
"get": {
168+
"description": "Retrieves transaction fee statistics including total fees, averages, min/max values, and slot information.",
169+
"consumes": [
170+
"application/json"
171+
],
172+
"produces": [
173+
"application/json"
174+
],
175+
"tags": [
176+
"statistics"
177+
],
178+
"summary": "Get Cost Statistics",
179+
"responses": {
180+
"200": {
181+
"description": "Cost statistics",
182+
"schema": {
183+
"$ref": "#/definitions/database.CostStatistics"
184+
}
185+
},
186+
"500": {
187+
"description": "Internal server error",
188+
"schema": {
189+
"type": "object",
190+
"additionalProperties": {
191+
"type": "string"
192+
}
193+
}
194+
}
195+
}
196+
}
197+
}
198+
},
199+
"definitions": {
200+
"database.CostStatistics": {
201+
"type": "object",
202+
"properties": {
203+
"averageFee": {
204+
"type": "number"
205+
},
206+
"earliestSlot": {
207+
"type": "integer"
208+
},
209+
"latestSlot": {
210+
"type": "integer"
211+
},
212+
"maxFee": {
213+
"type": "integer"
214+
},
215+
"minFee": {
216+
"type": "integer"
217+
},
218+
"totalFees": {
219+
"type": "integer"
220+
},
221+
"totalTransactions": {
222+
"type": "integer"
223+
}
224+
}
225+
},
226+
"database.GetAllObjectIDsResult": {
227+
"type": "object",
228+
"properties": {
229+
"hasMore": {
230+
"type": "boolean"
231+
},
232+
"limit": {
233+
"type": "integer"
234+
},
235+
"objectIds": {
236+
"type": "array",
237+
"items": {
238+
"type": "string"
239+
}
240+
},
241+
"offset": {
242+
"type": "integer"
243+
},
244+
"total": {
245+
"type": "integer"
246+
}
247+
}
110248
}
111249
},
112250
"tags": [
@@ -117,6 +255,10 @@ const docTemplate = `{
117255
{
118256
"description": "System status and health monitoring endpoints",
119257
"name": "system"
258+
},
259+
{
260+
"description": "Statistics and analytics endpoints",
261+
"name": "statistics"
120262
}
121263
]
122264
}`

docs/swagger.json

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,61 @@
3939
}
4040
}
4141
},
42+
"/objects": {
43+
"get": {
44+
"description": "Retrieves a paginated list of all tracked object IDs from the database.",
45+
"consumes": [
46+
"application/json"
47+
],
48+
"produces": [
49+
"application/json"
50+
],
51+
"tags": [
52+
"objects"
53+
],
54+
"summary": "Get All Object IDs",
55+
"parameters": [
56+
{
57+
"type": "integer",
58+
"description": "Number of items per page (default: 20, max: 1000)",
59+
"name": "limit",
60+
"in": "query"
61+
},
62+
{
63+
"type": "integer",
64+
"description": "Number of items to skip (default: 0)",
65+
"name": "offset",
66+
"in": "query"
67+
}
68+
],
69+
"responses": {
70+
"200": {
71+
"description": "Paginated list of object IDs",
72+
"schema": {
73+
"$ref": "#/definitions/database.GetAllObjectIDsResult"
74+
}
75+
},
76+
"400": {
77+
"description": "Invalid query parameters",
78+
"schema": {
79+
"type": "object",
80+
"additionalProperties": {
81+
"type": "string"
82+
}
83+
}
84+
},
85+
"500": {
86+
"description": "Internal server error",
87+
"schema": {
88+
"type": "object",
89+
"additionalProperties": {
90+
"type": "string"
91+
}
92+
}
93+
}
94+
}
95+
}
96+
},
4297
"/objects/{id}": {
4398
"get": {
4499
"description": "Retrieves an object by its ID from the database with key-value pairs. Optionally specify a timestamp to get historical state.",
@@ -104,6 +159,89 @@
104159
}
105160
}
106161
}
162+
},
163+
"/statistics/costs": {
164+
"get": {
165+
"description": "Retrieves transaction fee statistics including total fees, averages, min/max values, and slot information.",
166+
"consumes": [
167+
"application/json"
168+
],
169+
"produces": [
170+
"application/json"
171+
],
172+
"tags": [
173+
"statistics"
174+
],
175+
"summary": "Get Cost Statistics",
176+
"responses": {
177+
"200": {
178+
"description": "Cost statistics",
179+
"schema": {
180+
"$ref": "#/definitions/database.CostStatistics"
181+
}
182+
},
183+
"500": {
184+
"description": "Internal server error",
185+
"schema": {
186+
"type": "object",
187+
"additionalProperties": {
188+
"type": "string"
189+
}
190+
}
191+
}
192+
}
193+
}
194+
}
195+
},
196+
"definitions": {
197+
"database.CostStatistics": {
198+
"type": "object",
199+
"properties": {
200+
"averageFee": {
201+
"type": "number"
202+
},
203+
"earliestSlot": {
204+
"type": "integer"
205+
},
206+
"latestSlot": {
207+
"type": "integer"
208+
},
209+
"maxFee": {
210+
"type": "integer"
211+
},
212+
"minFee": {
213+
"type": "integer"
214+
},
215+
"totalFees": {
216+
"type": "integer"
217+
},
218+
"totalTransactions": {
219+
"type": "integer"
220+
}
221+
}
222+
},
223+
"database.GetAllObjectIDsResult": {
224+
"type": "object",
225+
"properties": {
226+
"hasMore": {
227+
"type": "boolean"
228+
},
229+
"limit": {
230+
"type": "integer"
231+
},
232+
"objectIds": {
233+
"type": "array",
234+
"items": {
235+
"type": "string"
236+
}
237+
},
238+
"offset": {
239+
"type": "integer"
240+
},
241+
"total": {
242+
"type": "integer"
243+
}
244+
}
107245
}
108246
},
109247
"tags": [
@@ -114,6 +252,10 @@
114252
{
115253
"description": "System status and health monitoring endpoints",
116254
"name": "system"
255+
},
256+
{
257+
"description": "Statistics and analytics endpoints",
258+
"name": "statistics"
117259
}
118260
]
119261
}

0 commit comments

Comments
 (0)