Automating REST API Documentation with OpenAPI and Go

The OpenAPI ecosystem, historically known as Swagger, provides a standardized framework for designing, documenting, and consuming RESTful web services. By leveraging a machine-readable specification, development teams can streamline API lifecycle management. Core Ecosystem Components OpenAPI Specification: A language-agnostic contract defining ...

Posted on Sat, 10 Oct 2026 16:04:16 +0000 by tgavin

Implementing JWT Token Auto-Refresh for Continuous User Sessions in Go

Overview When building authentication systems, it's often necessary to extend token validity while users remain active. This implementation provides a sliding window expiration mechanism where tokens are automatically refreshed as long as the user continues to make requests. Implementation package api import ( "net/http" "time ...

Posted on Mon, 05 Oct 2026 16:26:19 +0000 by fizix

Designing a Go Project Structure: A Practical Guide

Why Start with a Project Structure? When beginning a new Go project, establishing a clear directory structure is a foundational step. For newcomers, every aspect of development can be a new challenge: Where should global configurations reside? How is the database connection initialized? How should data models be designed? How are routes organi ...

Posted on Tue, 29 Sep 2026 16:56:59 +0000 by pengu

Comparative Guide to Database Index Types: PostgreSQL, Oracle, and MySQL

Overview of Indexing Mechanisms When designing robust database architectures, selecting the appropriate index type is crucial for query performance. PostgreSQL, Oracle, and MySQL each offer distinct indexing mechanisms tailored to different data structures and workload profiles. Common Index Types B-Tree Indexes: Supported across all three pla ...

Posted on Tue, 04 Aug 2026 16:39:04 +0000 by cartoonjunkie

Building a GVA-Based Admin System with Gin, Vue, and JWT

Login Handling with Sestion and JWT Session-based authentication is required to restrict page access to logged-in users only. The Gin framework provides session middleware via github.com/gin-contrib/sessions. import "github.com/gin-contrib/sessions" rootRouter.GET("/login", func(c *gin.Context) { session := sessions.Def ...

Posted on Tue, 02 Jun 2026 18:38:17 +0000 by jexx

Understanding Gin Middleware Flow: Next(), Abort(), and the Onion Model

Gin Context Handling // Gin context processing func (engine *Engine) HandleContext(c *Context) { oldIndexValue := c.index c.reset() engine.handleHTTPRequest(c) c.index = oldIndexValue } // Route matching logic func (engine *Engine) handleHTTPRequest(c *Context) { httpMethod := c.Request.Method rPath := c.Request.URL.Path unes ...

Posted on Thu, 28 May 2026 16:40:28 +0000 by kriss37