https://github.com/askrella/gin-transaction
Integrate your database transactions seamlessly into the gin context, enabling effortless retrieval and utilization within your routes.
https://github.com/askrella/gin-transaction
Last synced: 4 months ago
JSON representation
Integrate your database transactions seamlessly into the gin context, enabling effortless retrieval and utilization within your routes.
- Host: GitHub
- URL: https://github.com/askrella/gin-transaction
- Owner: askrella
- License: mit
- Created: 2023-06-08T15:05:42.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T12:36:45.000Z (over 2 years ago)
- Last Synced: 2024-12-31T13:34:56.816Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gin-transactions
The "gin-transactions" library, developed by [Askrella](https://askrella.de), provides a middleware that seamlessly integrates database transactions into the gin context. Our middleware injects the database transaction into the gin context, enabling developers to effortlessly retrieve and utilize the transaction within their routes.
# Database support
- Neo4j
- Gorm
# Installation
```
go get -u github.com/askrella/gin-transactions
```
# Register gin middleware
```
gintx.BuildNeo4JTransactionMiddleware
gintx.BuildGormTransactionMiddleware
```
# Retrieve database transaction
```
gintx.GetNeo4JTransaction
gintx.GetGormTransaction
```