|
|
há 2 meses atrás | |
|---|---|---|
| .. | ||
| README.md | 7e298f8ad1 ✨ feat: refactor environment variable initialization and introduce new constant types for API and context keys | há 5 meses atrás |
| api_type.go | 3199e2e8cd Merge branch 'main-upstream' into pr/custom-currency-1923 | há 2 meses atrás |
| azure.go | 7aa54a2cd7 feat: add AzureNoRemoveDotTime constant and update channel handling #1044 | há 7 meses atrás |
| cache_key.go | 7e298f8ad1 ✨ feat: refactor environment variable initialization and introduce new constant types for API and context keys | há 5 meses atrás |
| channel.go | 9f4a2d64a3 feat: add sora video submit task | há 2 meses atrás |
| context_key.go | abcb353793 feats:add custom headers override | há 4 meses atrás |
| endpoint_type.go | 6bc3e62fd5 feat: add endpoint type selection to channel testing functionality | há 2 meses atrás |
| env.go | 7e298f8ad1 ✨ feat: refactor environment variable initialization and introduce new constant types for API and context keys | há 5 meses atrás |
| finish_reason.go | d40e6ec25d fix: gemini func call | há 1 ano atrás |
| midjourney.go | 660180ea1b 支持Midjourney视频任务和图片编辑 | há 6 meses atrás |
| multi_key_mode.go | f0f277dc2a 🔧 refactor(auth, channel, context): improve context setup and validation for multi-key channels | há 5 meses atrás |
| setup.go | a882e680ae ✨ feat: Implement system setup functionality | há 8 meses atrás |
| task.go | 8f9960bcc7 feat: vidu video add starEnd and reference gen video | há 3 meses atrás |
/constant)该目录仅用于放置全局可复用的常量定义,不包含任何业务逻辑或依赖关系。
| 文件 | 说明 |
|---|---|
azure.go |
定义与 Azure 相关的全局常量,如 AzureNoRemoveDotTime(控制删除 . 的截止时间)。 |
cache_key.go |
缓存键格式字符串及 Token 相关字段常量,统一缓存命名规则。 |
channel_setting.go |
Channel 级别的设置键,如 proxy、force_format 等。 |
context_key.go |
定义 ContextKey 类型以及在整个项目中使用的上下文键常量(请求时间、Token/Channel/User 相关信息等)。 |
env.go |
环境配置相关的全局变量,在启动阶段根据配置文件或环境变量注入。 |
finish_reason.go |
OpenAI/GPT 请求返回的 finish_reason 字符串常量集合。 |
midjourney.go |
Midjourney 相关错误码及动作(Action)常量与模型到动作的映射表。 |
setup.go |
标识项目是否已完成初始化安装 (Setup 布尔值)。 |
task.go |
各种任务(Task)平台、动作常量及模型与动作映射表,如 Suno、Midjourney 等。 |
user_setting.go |
用户设置相关键常量以及通知类型(Email/Webhook)等。 |
constant 包只能被其他包引用(import),禁止在此包中引用项目内的其他自定义包。如确有需要,仅允许引用 Go 标准库。⚠️ 违反以上约定将导致包之间产生不必要的耦合,影响代码可维护性与可测试性。请在提交代码前自行检查。