feat: add generic queue and subscription retirement

This commit is contained in:
2026-09-27 14:39:49 +08:00
parent d54bdd9847
commit c9e877c3f7
53 changed files with 1013 additions and 88 deletions

View File

@@ -26,8 +26,10 @@ type ApplicationPage struct {
// AccessQueue 是接入配置可选的队列。
type AccessQueue struct {
ID core.ID `json:"id"` // ID 队列标识。
Name string `json:"name"` // Name 队列名称。
Paused bool `json:"paused"` // Paused 暂停执行,不能表示已退役。
RetiredAt *time.Time `json:"retired_at,omitempty"` // RetiredAt 永久退役时间,历史仍可查询。
ID core.ID `json:"id"` // ID 队列标识。
Name string `json:"name"` // Name 队列名称。
}
// AccessCredential 是脱敏的凭据元数据,绝不返回秘密或秘密摘要。
@@ -44,11 +46,13 @@ type AccessCredential struct {
// ApplicationDetail 展示一个命名空间的队列和凭据,读取量有界。
type ApplicationDetail struct {
TokenVaultEnabled bool `json:"token_vault_enabled"` // TokenVaultEnabled 当前节点是否配置了凭据保管密钥。
Entry ApplicationEntry `json:"entry"` // Entry 当前应用与环境。
Queues []AccessQueue `json:"queues"` // Queues 最多 100 个队列。
Credentials []AccessCredential `json:"credentials"` // Credentials 最多 100 张凭据。
Truncated bool `json:"truncated"` // Truncated 为真时不得把当前结果解释为完整清单。
ActiveSubscriptions uint64 `json:"active_subscriptions"` // ActiveSubscriptions 未退役订阅数量,包含暂停订阅。
SubscriptionLimit uint32 `json:"subscription_limit"` // SubscriptionLimit 命名空间活动订阅上限。
TokenVaultEnabled bool `json:"token_vault_enabled"` // TokenVaultEnabled 当前节点是否配置了凭据保管密钥。
Entry ApplicationEntry `json:"entry"` // Entry 当前应用与环境。
Queues []AccessQueue `json:"queues"` // Queues 最多 100 个队列。
Credentials []AccessCredential `json:"credentials"` // Credentials 最多 100 张凭据。
Truncated bool `json:"truncated"` // Truncated 为真时不得把当前结果解释为完整清单。
}
// ApplicationInput 描述创建应用或变更凭据的管理员意图。