新增功能: - 新增 Sora 账号管理和 OAuth 认证 - 新增 Sora 视频/图片生成 API 网关 - 新增 Sora 任务调度和缓存机制 - 新增 Sora 使用统计和计费支持 - 前端增加 Sora 平台配置界面 安全修复(代码审核): - [SEC-001] 限制媒体下载响应体大小(图片 20MB、视频 200MB),防止 DoS 攻击 - [SEC-002] 限制 SDK API 响应大小(1MB),防止内存耗尽 - [SEC-003] 修复 SSRF 风险,添加 URL 验证并强制使用代理配置 BUG 修复(代码审核): - [BUG-001] 修复 for 循环内 defer 累积导致的资源泄漏 - [BUG-002] 修复图片并发槽位获取失败时已持有锁未释放的永久泄漏 性能优化(代码审核): - [PERF-001] 添加 Sentinel Token 缓存(3 分钟有效期),减少 PoW 计算开销 技术细节: - 使用 io.LimitReader 限制所有外部输入的大小 - 添加 urlvalidator 验证防止 SSRF 攻击 - 使用 sync.Map 实现线程安全的包级缓存 - 优化并发槽位管理,添加 releaseAll 模式防止泄漏 影响范围: - 后端:新增 Sora 相关数据模型、服务、网关和管理接口 - 前端:新增 Sora 平台配置、账号管理和监控界面 - 配置:新增 Sora 相关配置项和环境变量 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
68 lines
2.1 KiB
Go
68 lines
2.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package predicate
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
// APIKey is the predicate function for apikey builders.
|
|
type APIKey func(*sql.Selector)
|
|
|
|
// Account is the predicate function for account builders.
|
|
type Account func(*sql.Selector)
|
|
|
|
// AccountGroup is the predicate function for accountgroup builders.
|
|
type AccountGroup func(*sql.Selector)
|
|
|
|
// Group is the predicate function for group builders.
|
|
type Group func(*sql.Selector)
|
|
|
|
// PromoCode is the predicate function for promocode builders.
|
|
type PromoCode func(*sql.Selector)
|
|
|
|
// PromoCodeUsage is the predicate function for promocodeusage builders.
|
|
type PromoCodeUsage func(*sql.Selector)
|
|
|
|
// Proxy is the predicate function for proxy builders.
|
|
type Proxy func(*sql.Selector)
|
|
|
|
// RedeemCode is the predicate function for redeemcode builders.
|
|
type RedeemCode func(*sql.Selector)
|
|
|
|
// Setting is the predicate function for setting builders.
|
|
type Setting func(*sql.Selector)
|
|
|
|
// SoraAccount is the predicate function for soraaccount builders.
|
|
type SoraAccount func(*sql.Selector)
|
|
|
|
// SoraCacheFile is the predicate function for soracachefile builders.
|
|
type SoraCacheFile func(*sql.Selector)
|
|
|
|
// SoraTask is the predicate function for soratask builders.
|
|
type SoraTask func(*sql.Selector)
|
|
|
|
// SoraUsageStat is the predicate function for sorausagestat builders.
|
|
type SoraUsageStat func(*sql.Selector)
|
|
|
|
// UsageCleanupTask is the predicate function for usagecleanuptask builders.
|
|
type UsageCleanupTask func(*sql.Selector)
|
|
|
|
// UsageLog is the predicate function for usagelog builders.
|
|
type UsageLog func(*sql.Selector)
|
|
|
|
// User is the predicate function for user builders.
|
|
type User func(*sql.Selector)
|
|
|
|
// UserAllowedGroup is the predicate function for userallowedgroup builders.
|
|
type UserAllowedGroup func(*sql.Selector)
|
|
|
|
// UserAttributeDefinition is the predicate function for userattributedefinition builders.
|
|
type UserAttributeDefinition func(*sql.Selector)
|
|
|
|
// UserAttributeValue is the predicate function for userattributevalue builders.
|
|
type UserAttributeValue func(*sql.Selector)
|
|
|
|
// UserSubscription is the predicate function for usersubscription builders.
|
|
type UserSubscription func(*sql.Selector)
|