2026-05-09 17:50:40 +08:00
2026-05-13 21:55:29 +08:00
2026-05-13 21:26:22 +08:00
2026-05-13 21:26:22 +08:00
2026-05-09 17:50:40 +08:00
2026-05-13 21:55:29 +08:00
2026-04-24 16:55:28 +08:00
2026-04-24 16:55:28 +08:00
2026-05-13 21:55:29 +08:00

level

本地配置

服务启动时会读取项目根目录的 config.yaml,也兼容读取 config/config.yaml。该文件包含数据库账号密码,已加入 .gitignore,不要提交到 Git 仓库。

配置格式如下:

database:
  user: "your_mysql_user"
  password: "your_mysql_password"
  host: "localhost"
  port: 3306
  dbname: "level"
  charset: "utf8mb4"
  collation: "utf8mb4_unicode_ci"

server:
  port: 18080

如果 config.yaml 已经被远程仓库跟踪过,仅添加 .gitignore 不会自动停止跟踪,需要执行:

git rm --cached config.yaml
git commit -m "chore: stop tracking local config"

这只会从 Git 索引中移除配置文件,本地文件仍会保留。若远程历史里已经包含真实密码,需要同时更换相关密码;如需彻底清理 Git 历史,可再用 git filter-repo 或 BFG 处理。

数据库 DDL

当前代码使用的表结构保存在 database/ddl/current_tables.sql。这些表包括:

  • trade_calendar
  • stock_daily
  • stock_basic
  • limit_list_d
  • stock_limit_combined_data

该文件由本地 level 库执行 SHOW CREATE TABLE 导出。

S
Description
go后端
Readme 350 KiB
Languages
Go 100%