add more documentation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-22 20:30:02 +11:00
parent 68ee2838e4
commit c8f04efd51
7 changed files with 500 additions and 325 deletions

View File

@@ -92,19 +92,13 @@ const docTemplate = `{
"200": {
"description": "Cleanup completed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -141,19 +135,13 @@ const docTemplate = `{
"200": {
"description": "Ciphertext response",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -282,28 +270,19 @@ const docTemplate = `{
"200": {
"description": "Modify event processed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"202": {
"description": "No relevant changes",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -338,28 +317,19 @@ const docTemplate = `{
"200": {
"description": "Move event processed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -393,19 +363,13 @@ const docTemplate = `{
"200": {
"description": "Import processed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -441,19 +405,13 @@ const docTemplate = `{
"200": {
"description": "Cleanup completed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusMessageResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -505,10 +463,7 @@ const docTemplate = `{
"500": {
"description": "Report generation failed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -543,19 +498,13 @@ const docTemplate = `{
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -581,10 +530,7 @@ const docTemplate = `{
"500": {
"description": "Report generation failed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -614,34 +560,31 @@ const docTemplate = `{
"name": "date",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Monthly aggregation granularity: hourly or daily",
"name": "granularity",
"in": "query"
}
],
"responses": {
"200": {
"description": "Aggregation complete",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -673,28 +616,19 @@ const docTemplate = `{
"200": {
"description": "Snapshot started",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.StatusResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -714,17 +648,13 @@ const docTemplate = `{
"200": {
"description": "Migration results",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/models.SnapshotMigrationResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.SnapshotMigrationResponse"
}
}
}
@@ -744,17 +674,13 @@ const docTemplate = `{
"200": {
"description": "Regeneration summary",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/models.SnapshotRegenerateReportsResponse"
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.ErrorResponse"
}
}
}
@@ -774,10 +700,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.SnapshotRepairResponse"
}
}
}
@@ -797,10 +720,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
"$ref": "#/definitions/models.SnapshotRepairSuiteResponse"
}
}
}
@@ -1214,6 +1134,17 @@ const docTemplate = `{
}
}
},
"models.ErrorResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"models.ImportReceived": {
"type": "object",
"properties": {
@@ -1254,6 +1185,119 @@ const docTemplate = `{
"type": "string"
}
}
},
"models.SnapshotMigrationResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"stats": {
"$ref": "#/definitions/models.SnapshotMigrationStats"
},
"status": {
"type": "string"
}
}
},
"models.SnapshotMigrationStats": {
"type": "object",
"properties": {
"DailyRegistered": {
"type": "integer"
},
"Errors": {
"type": "integer"
},
"HourlyRegistered": {
"type": "integer"
},
"HourlyRenamed": {
"type": "integer"
},
"MonthlyRegistered": {
"type": "integer"
}
}
},
"models.SnapshotRegenerateReportsResponse": {
"type": "object",
"properties": {
"errors": {
"type": "integer"
},
"regenerated": {
"type": "integer"
},
"reports_dir": {
"type": "string"
},
"skipped": {
"type": "integer"
},
"snapshotType": {
"type": "string"
},
"status": {
"type": "string"
},
"total": {
"type": "integer"
}
}
},
"models.SnapshotRepairResponse": {
"type": "object",
"properties": {
"failed": {
"type": "string"
},
"repaired": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"models.SnapshotRepairSuiteResponse": {
"type": "object",
"properties": {
"daily_failed": {
"type": "string"
},
"daily_repaired": {
"type": "string"
},
"monthly_failed": {
"type": "string"
},
"monthly_refined": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"models.StatusMessageResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"models.StatusResponse": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
}
}
}
}`