diff --git a/docs/docs.go b/docs/docs.go index 6b35f536..48e913fc 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -5576,13 +5576,13 @@ const docTemplate = `{ "task.TaskMeta": { "type": "object", "properties": { - "asynqTask": { + "asynq_task": { "type": "string" }, "description": { "type": "string" }, - "maxRetry": { + "max_retry": { "type": "integer" }, "name": { @@ -5601,7 +5601,7 @@ const docTemplate = `{ "description": "是否支持手动重试", "type": "boolean" }, - "supportsTime": { + "supports_time": { "type": "boolean" }, "type": { @@ -5612,27 +5612,27 @@ const docTemplate = `{ "task.TaskParam": { "type": "object", "properties": { - "Description": { + "description": { "description": "描述", "type": "string" }, - "Label": { + "label": { "description": "显示名称", "type": "string" }, - "Name": { + "name": { "description": "参数键名", "type": "string" }, - "Placeholder": { + "placeholder": { "description": "占位符", "type": "string" }, - "Required": { + "required": { "description": "是否必填", "type": "boolean" }, - "Type": { + "type": { "description": "类型:string, text, number, boolean", "type": "string" } diff --git a/docs/swagger.json b/docs/swagger.json index 38ead169..fdec8678 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -5569,13 +5569,13 @@ "task.TaskMeta": { "type": "object", "properties": { - "asynqTask": { + "asynq_task": { "type": "string" }, "description": { "type": "string" }, - "maxRetry": { + "max_retry": { "type": "integer" }, "name": { @@ -5594,7 +5594,7 @@ "description": "是否支持手动重试", "type": "boolean" }, - "supportsTime": { + "supports_time": { "type": "boolean" }, "type": { @@ -5605,27 +5605,27 @@ "task.TaskParam": { "type": "object", "properties": { - "Description": { + "description": { "description": "描述", "type": "string" }, - "Label": { + "label": { "description": "显示名称", "type": "string" }, - "Name": { + "name": { "description": "参数键名", "type": "string" }, - "Placeholder": { + "placeholder": { "description": "占位符", "type": "string" }, - "Required": { + "required": { "description": "是否必填", "type": "boolean" }, - "Type": { + "type": { "description": "类型:string, text, number, boolean", "type": "string" } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index a9b812a0..fc6bdad3 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -751,11 +751,11 @@ definitions: type: object task.TaskMeta: properties: - asynqTask: + asynq_task: type: string description: type: string - maxRetry: + max_retry: type: integer name: type: string @@ -768,29 +768,29 @@ definitions: retryable: description: 是否支持手动重试 type: boolean - supportsTime: + supports_time: type: boolean type: type: string type: object task.TaskParam: properties: - Description: + description: description: 描述 type: string - Label: + label: description: 显示名称 type: string - Name: + name: description: 参数键名 type: string - Placeholder: + placeholder: description: 占位符 type: string - Required: + required: description: 是否必填 type: boolean - Type: + type: description: 类型:string, text, number, boolean type: string type: object diff --git a/internal/apps/admin/cache/routers.go b/internal/apps/admin/cache/routers.go index 858d6687..c71b3167 100644 --- a/internal/apps/admin/cache/routers.go +++ b/internal/apps/admin/cache/routers.go @@ -1,3 +1,6 @@ +// Copyright 2026 Arctel.net +// SPDX-License-Identifier: Apache-2.0 + // Package cache provides HTTP handlers for managing disk cache. package cache diff --git a/internal/diskcache/cache.go b/internal/diskcache/cache.go index 9721d577..8942053e 100644 --- a/internal/diskcache/cache.go +++ b/internal/diskcache/cache.go @@ -1,3 +1,6 @@ +// Copyright 2026 Arctel.net +// SPDX-License-Identifier: Apache-2.0 + // Package diskcache implements a platform-level disk-backed cache with size limit, TTL, and LRU eviction. package diskcache diff --git a/internal/task/meta.go b/internal/task/meta.go index 8c11301b..019fc637 100644 --- a/internal/task/meta.go +++ b/internal/task/meta.go @@ -11,27 +11,27 @@ import ( // //nolint:revive // TaskParam 保留完整名称以避免与通用 Param 混淆 type TaskParam struct { - Name string `json:"Name"` // 参数键名 - Label string `json:"Label"` // 显示名称 - Type string `json:"Type"` // 类型:string, text, number, boolean - Required bool `json:"Required"` // 是否必填 - Placeholder string `json:"Placeholder"` // 占位符 - Description string `json:"Description"` // 描述 + Name string `json:"name"` // 参数键名 + Label string `json:"label"` // 显示名称 + Type string `json:"type"` // 类型:string, text, number, boolean + Required bool `json:"required"` // 是否必填 + Placeholder string `json:"placeholder"` // 占位符 + Description string `json:"description"` // 描述 } // TaskMeta 任务元数据 // //nolint:revive // TaskMeta 保留完整名称以避免与通用 Meta 混淆 type TaskMeta struct { - Type string - AsynqTask string - Name string - Description string - SupportsTime bool - MaxRetry int - Queue string - Retryable bool // 是否支持手动重试 - Params []TaskParam + Type string `json:"type"` + AsynqTask string `json:"asynq_task"` + Name string `json:"name"` + Description string `json:"description"` + SupportsTime bool `json:"supports_time"` + MaxRetry int `json:"max_retry"` + Queue string `json:"queue"` + Retryable bool `json:"retryable"` // 是否支持手动重试 + Params []TaskParam `json:"params,omitempty"` } var (