Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/togettoyou/goat
🐐 基于 gin 进行快速构建 RESTFUL API 的项目框架
https://github.com/togettoyou/goat
gin go gorm
Last synced: about 1 month ago
JSON representation
🐐 基于 gin 进行快速构建 RESTFUL API 的项目框架
- Host: GitHub
- URL: https://github.com/togettoyou/goat
- Owner: togettoyou
- License: mit
- Created: 2021-08-10T09:23:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-31T02:19:00.000Z (over 1 year ago)
- Last Synced: 2024-10-27T07:02:49.252Z (3 months ago)
- Topics: gin, go, gorm
- Language: Go
- Homepage:
- Size: 303 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goat
goat 是基于 gin 进行快速构建 RESTFUL API 的项目框架
# 脚手架安装
```shell
go install github.com/togettoyou/goat/cmd/goatkit@latest
```Or
```shell
go get -u github.com/togettoyou/goat/cmd/goatkit
```# 使用
```
# 创建项目模板
goatkit new helloworldcd helloworld
# 运行程序
goatkit run# 生成 swag 文档
goatkit swag# 使用镜像代理
export GOAT_LAYOUT_REPO=https://github.com.cnpmjs.org/togettoyou/goat.git
goatkit new helloworld# 更多帮助
goatkit -h
```# 文档
项目的依赖路径为: [model 层](internal/model/README.md) -> [dao 层](internal/dao/README.md) -> [svc 层](internal/svc/README.md)
-> [api 层](internal/api/README.md)其中 model struct 串联各个层
[router 层](internal/server/router/README.md) 负责路由注册