gin-gorm-admin

module
v0.0.0-...-3363d21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT

README

gin-gorm-admin

基于 GIN + GORM + WIRE 实现web脚手架,目标是提供一套轻量的中后台开发框架,方便、快速的完成业务需求的开发。

账号:admin 密码:123456

账号:test 密码:123456

特性

  • 遵循 RESTful API 设计规范 & 基于接口的编程规范
  • 基于 GIN 框架,提供了丰富的中间件支持(JWTAuth、CORS、RequestRateLimiter、Recover、GZIP)
  • 基于jwt 认证
  • 基于go-playground/validator开源库简化gin的请求校验
  • 用Docker上云
  • 在token过期后的一个小时内,用户再次操作会要求重新登陆
  • 基于swaggo为Go工程生成自动化接口文档
  • 基于wire依赖注入
  • 基于gorm全功能ORM
  • 基于air自动编译,重启程序
  • 基于redis限制请求频率
项目结构

├─api
├─cmd
├─configs
├─docs
├─internal
│  ├─config
│  ├─contextx
│  ├─errors
│  ├─ginx
│  ├─middleware
│  ├─models
│  ├─schema
│  ├─service
│  └─validate
└─pkg
    ├─fileStore
    ├─gormx
    ├─hash
    ├─helper
    ├─logger
    ├─monitor
    ├─rabbitMQ
    ├─redisHelper
    ├─store
    ├─timer
    ├─types
    └─validate
下载依赖
depend.cmd
代码生成与运行
生成
generate.cmd
数据库
gin-admin.sql
运行
run.cmd 或go run ./cmd/gin-gorm-admin/ web -c ./configs/config.toml
docker部署
deploy.cmd

前端工程

基于 vueelement-ui实现:gin-admin-vue

Directories

Path Synopsis
api
v1
cmd
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL