________ _____
_____ ______ _____ ___ __/______ ________ ________ ______ _________ ___(_)
_ _ \_ __ \_ _ \__ /_ _ __ `/__ __ \__ ___/ _ __ `/___ __ \__ /
/ __// /_/ // __/_ __/ / /_/ / _ / / /_(__ ) / /_/ / __ /_/ /_ /
\___/ \____/ \___/ /_/ \__,_/ /_/ /_/ /____/ \__,_/ _ .___/ /_/
/_/
eoefans api支持
项目主页
部署请前往eoefans api Azure deploy 和 eoefans spider Azure deploy,选择手动执行并指定tag。
发布新版时,sentry_release
必填true或1。回滚/部署旧版时填写任意值即可。
- golang 1.18+
- mysql 8.0+
├─builder # 构建目录
│ ├─api
│ └─spider
├─cmd # 可执行文件
│ └─api
├─config # 配置文件
└─internal # 内部使用
├─app # 具体应用
│ └─api
│ ├─apperrors
│ ├─handler # http handler
│ ├─help # 助手函数
│ ├─idl # 资源定义
│ ├─middlewares # 中间件
│ ├─repository
│ ├─router # http router
│ ├─service
│ ├─spider
│ └─util 工具库
├─launcher # 基础启动器
└─pkg # 第三方依赖封装
├─bilibili
├─cache
├─config
├─database
├─httpclient
├─httpserver
├─log
└─smsclient
# clone repository
git clone ssh://git@ssh.git.vtb.link:7999/eoefans/eoefans-api.git
# download go mod
cd eoefans-api && go mod download
# clone repository
git clone ssh://git@ssh.git.vtb.link:7999/eoefans/eoefans-api.git
cd eoefans-api
# docker builder
# 如果在 CN 进行 build 请自行将 Dockerfile 中注释的镜像源相关行开启
docker build --rm -t eoefans-api:latest -f builder/api/Dockerfile .
# spider builder 可选的
docker build --rm -t eoefans-spider:latest -f builder/spider/Dockerfile .
# copy config file 并自行修改相关配置
cp config/config.template.yml config/api.yml
# docker run
docker run \
--detach \
--name eoefans-api \
--volume $PWD/config:/config \
eoefans-api:latest
- 文件命名
- 全小写
- 尽可能短
- 尽量避免使用
_
,如果一定要分割,使用_
- 变量命名
- 驼峰
- 常量命名
- 驼峰
- fork repository
- checkout develop -> feature
- coding
- pull request
- review
- merge
- feature: 新增 feature
- fix: 修复 bug
- hotfix: 紧急修复 bug
- docs: 仅仅修改了文档,比如 README, CHANGELOG, CONTRIBUTE等等
- style: 仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑
- refactor: 代码重构,对外行为保持一致(你最好没有搞出新bug)
- perf: 优化相关,比如提升性能、体验
- test: 测试用例,包括单元测试、集成测试等
- chore: 改变构建流程、或者增加依赖库、工具等
- revert: 回滚到上一个版本
- apifox
- 注册后联系管理者加组