Skip to content

Repository files navigation

Gin template

gin + gorm project template

Language GitHub release LICENSE

Frontend

web

Features

  • 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

Interface List

  • Resources
  • Menus
  • Organizations
  • Roles
  • Users

Configuration File

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

Swagger

install

go install github.com/swaggo/swag/cmd/swag@latest

init or update

swag init

UI URL

http://localhost:8080/swagger/index.html

About

gin + gorm project template

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages