⚡️ Lightweight, efficient, fast, out-of-the-box scaffolding for Goweb development based on Gin framework
- ⚙️ Configuration file management:The configuration file is read through the Viper open source library of Go language
- 🔐 Authority management:The JWT middleware is used to implement the restriction of user interface access rights
- 📒 Log management:Six log levels were encapsulated, the system operation was logged, and the log was standardized and written to a file
- 😄 Type management:Encapsulate type conversion to facilitate conversion between different types
- 🙅 Error code management:The error code is encapsulated uniformly, and the standard return of status code is realized
- 📁 Pagination management:Encapsulate paging parameters to achieve unified paging return of all interfaces
- ☁️ File Upload management: The interface of file upload and file access was encapsulated, and the secure file upload (using MD5 algorithm to rename the file) and access were realized
- ⚡️ Redis management:Added Redis caching function to make system response faster
go-gin-init
├── configs #Configuration file
├── docs #The documentation collection
├── global #A global variable
├── internal #The internal module
│ ├── dao #Database Access Object.All data-related operations are performed in the dao layer
│ ├── middleware #HTTP middleware
│ ├── model #This is the model layer that holds Model objects.
│ ├── routers #routing logic
│ └── service #The core business logic of the project.
├── pkg #Project-specific module packages
├── storage #The temporary file generated by the project
├── scripts #Scripts for build, install, analysis, etc.
└── third_party #third-party resources such as Swagger UI
- 📧 Email alarm Handling:A simple E-mail alarm function needs to be implemented to ensure that after the Panic occurs, the corresponding person in charge can be notified by E-mail alarm in time after the arrest.
- ⏰ Interface current limiting control:As your application runs, new clients are coming in all the time, and sometimes there is a sudden spike in traffic (e.g., a marketing campaign).If you don't cull the peak in time and your resources aren't keeping up, it can lead to accidents
- 🐱 Unified timeout control:It prevents upstream and downstream applications from interfering with each other, leading to cascaded reactions that ultimately make the entire cluster application unavailable at a certain scale
- ⛓️ Link tracking:Distributed link tracing is used to solve part of the problem of observability
If you have any questions about this project, please feel free to post your questions on issuse.
🐦 Twitter:Copilotshub