new-api

module
v0.0.0-...-b2e70c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0

README

CodeGO API · V2

当前维护版本为 V2,代码基线为生产版本 2a543bef367e16e79450ae0a549a6d10e2994cac。后续修复在 main 上进行。

开发与验证

需要 Go 1.26、Bun 及 Node.js。先构建网页,后编译后端(控制服务会嵌入网页资源):

cd web/default
bun install --frozen-lockfile
bun run build
cd ../..
go build -p 1 ./cmd/...
go test -p 1 ./internal/billing/app ./internal/gateway/execution/providers/openai

后端入口位于 cmd/;前端位于 web/default/。V2 架构文档见 docs/architecture/codego-v2。本地配置使用 .env.example,真实服务器凭据与数据库文件存放在仓库之外。

镜像与生产

main 推送后由 GitHub Actions 构建 V2 镜像。生产部署工作流只接受手动触发,代码推送和镜像构建不会自动切流。生产仍使用已验证的各服务固定镜像;恢复代码无需迁移数据库。

镜像仓库:ghcr.io/sh2001sh/codego-api。V2 运行配置见 docker-compose.yml。

V3 归档

V3 已停止维护,已提交代码保留在 archive/v3-before-v2-20261015。V3 源码与构建流程已从 main 移除。

临时日志、浏览器会话、测试快照和本地运维文件不纳入源码。分析报告整理在 docs/reports。

许可

保留上游版权与 LICENSE、NOTICE、THIRD-PARTY-LICENSES.md。

Directories

Path Synopsis
cmd
control-api command
db-migrate command
gateway-api command
ledger-backfill command
ledger-worker command
local-loadtest command
local-loadtest exercises the real gateway with disposable loopback fixtures.
local-loadtest exercises the real gateway with disposable loopback fixtures.
local-querybench command
local-querybench measures query and reclaim paths against disposable loopback data.
local-querybench measures query and reclaim paths against disposable loopback data.
local-streambench command
local-streambench measures synthetic long streams through disposable local gateways.
local-streambench measures synthetic long streams through disposable local gateways.
v2-verify command
workflow-worker command
internal
commerce/luckysettings
Package luckysettings retains only the fixed defaults needed to replay the historical blind-box draw-window migration.
Package luckysettings retains only the fixed defaults needed to replay the historical blind-box draw-window migration.
setting
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL