Skip to content

spumant/kratos-git

Repository files navigation

Kratos gorm git

安装

  1. 安装 cli 工具
go install github.com/go-kratos/kratos/cmd/kratos/v2@latest 
  1. 初始项目
kratos new kratos-gorm-git
  1. 运行
kratos run

相关命令

# 用户模块
# 创建 user.proto
kratos proto add api/git/user.proto
# 创建 PB
kratos proto client api/git/user.proto
# 生成 Service
kratos proto server api/git/user.proto t internal/service

# 仓库模块
# 创建 repo.proto
kratos proto add api/git/repo.proto
# 创建 PB
kratos proto client api/git/repo.proto
# 生成 Service
kratos proto server api/git/repo.proto t internal/service

# config init pb
kratos proto client internal/conf/conf.proto

核心扩展

go get github.com/asim/git-http-backend

Git 远程仓库的其他实现

  1. 使用git守护进程
git daemon --export-all --verbose --base-path=. --export-all --port=9091 --enable=receive-pack 
  1. 使用http-backend

About

基于Kratos、gorm、git实现代码托管平台

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors