gin + gorm project template
- Multi organizational permission design
- Restful API design
- Database repository Gorm
- Log repository zap
- Base authentication JWT
- Api Docs repository Swagger
- Return result message based on i18n
- Configuration file repository viper
- Resources
- Menus
- Organizations
- Roles
- Users
config.yml
server:
port: 8080
logging:
level: info
file:
name: app.log
path: logs
# en/zh-CN
language: en
datasource:
driver: mysql
url: tcp(127.0.0.1:3306)/test?charset=utf8mb4&parseTime=True&loc=Local
username:
password:
jwt:
secret: test
expire: 7
verification:
resourceEnabled: false
redis:
addr: localhost:6379
password:
db: 0
go install github.com/swaggo/swag/cmd/swag@latest
swag init
http://localhost:8080/swagger/index.html