Nugget post: Registering interfaces with Gin-gonic Sessions

When building a Gin-gonic based web application, you'll probably come across a situation where you'd like to store information about the request in a session - essentially anything that requires HTTP cookies. Gin+gonic provides the "sessions" middleware to address this: https://github.com/gin-contrib/sessions Gin middleware for session management with multi-backend support: - cookie-based - Redis - memcached … Continue reading Nugget post: Registering interfaces with Gin-gonic Sessions

Lessons Learned: GoLang GORM – filtering associations

The problem Given the following code: type User struct { gorm.Model Username string Orders []Order } type Order struct { gorm.Model UserID uint Foobar string } The above Golang code defines a "Has Many" association, leading to a schema where a "User" "has many" "Orders", with the "user_id" key acting as a foreign key. How … Continue reading Lessons Learned: GoLang GORM – filtering associations