Skip to content

yanshiyason/gormmw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is middleware was adapted from popmw to work with gorm. Original source code: https://github.com/gobuffalo/buffalo-pop/tree/master/pop/popmw

Usage:

The only difference in usage, is that the logger must be passed in as an argument. In your buffalo app:

// Wraps each request in a transaction.
//  c.Value("tx").(*gorm.DB)
// Remove to disable this.
app.Use(gormmw.Transaction(models.DB, app.Logger))

About

buffalo middleware for GORM transaction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages