Versions in this module Expand all Collapse all v0 v0.2.0 Feb 9, 2026 Changes in this version + func Middleware[Req any](fn MiddlewareFunc[Req]) gin.HandlerFunc + func RegisterTranslation(lang, tag, message string) + type Context struct + func (c *Context) GetAuthenticatedUser(target any) error + func (c *Context) Lang() string + func (c *Context) SetAuthenticatedUser(user any) + type MiddlewareFunc func(ctx *Context, req Req) error v0.1.0 Nov 24, 2025 Changes in this version + func Created(w http.ResponseWriter, data interface{}) error + func Handle[Req any, Res any](fn HandlerFunc[Req, Res]) gin.HandlerFunc + func JSON(w http.ResponseWriter, status int, data interface{}) error + func NoContent(w http.ResponseWriter) error + func Success(w http.ResponseWriter, data interface{}) error + type App struct + func New() *App + func (a *App) DELETE(path string, handler gin.HandlerFunc) + func (a *App) EnableSwaggerUI(path string) + func (a *App) GET(path string, handler gin.HandlerFunc) + func (a *App) Group(path string, middleware ...gin.HandlerFunc) *gin.RouterGroup + func (a *App) PATCH(path string, handler gin.HandlerFunc) + func (a *App) POST(path string, handler gin.HandlerFunc) + func (a *App) PUT(path string, handler gin.HandlerFunc) + func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (a *App) Start(addr string) error + func (a *App) Use(middleware ...gin.HandlerFunc) + func (a *App) WithSwagger(title, version string, opts ...SwaggerOption) *App + type Components struct + Schemas map[string]Schema + type Ctx struct + Context context.Context + Request *http.Request + Response http.ResponseWriter + func NewCtx(w http.ResponseWriter, r *http.Request) Ctx + func (c *Ctx) Error(status int, message string) error + func (c *Ctx) JSON(status int, data interface{}) error + func (c *Ctx) PathParam(key string) string + func (c *Ctx) QueryParam(key string) string + type HTTPError struct + Message string + Status int + func BadRequest(message string) HTTPError + func Forbidden(message string) HTTPError + func InternalServerError(message string) HTTPError + func NewHTTPError(status int, message string) HTTPError + func NotFound(message string) HTTPError + func Unauthorized(message string) HTTPError + func (e HTTPError) Error() string + type HandlerFunc func(ctx *gin.Context, req Req) (Res, error) + type MediaType struct + Schema Schema + type OpenAPIInfo struct + Description string + Title string + Version string + type OpenAPISpec struct + Components Components + Info OpenAPIInfo + OpenAPI string + Paths map[string]PathItem + type Operation struct + Description string + Parameters []Parameter + RequestBody *RequestBody + Responses map[string]Response + Summary string + type Parameter struct + Description string + In string + Name string + Required bool + Schema Schema + type PathItem struct + DELETE *Operation + GET *Operation + PATCH *Operation + POST *Operation + PUT *Operation + type RequestBody struct + Content map[string]MediaType + Description string + Required bool + type Response struct + Content map[string]MediaType + Description string + type Schema struct + Description string + Example interface{} + Format string + Items *Schema + Properties map[string]Schema + Required []string + Type string + type SwaggerGenerator struct + func NewSwaggerGenerator(title, version string, opts ...SwaggerOption) *SwaggerGenerator + func (sg *SwaggerGenerator) AddEndpoint(method, path string, requestType, responseType reflect.Type, ...) + func (sg *SwaggerGenerator) Generate(handlers map[string]handlerInfo) map[string]interface{} + func (sg *SwaggerGenerator) GetJSON() ([]byte, error) + func (sg *SwaggerGenerator) GetSpec() OpenAPISpec + func (sg *SwaggerGenerator) UIHandler() gin.HandlerFunc + type SwaggerOption func(*SwaggerGenerator) + func WithSwaggerDescription(desc string) SwaggerOption + func WithSwaggerPageTitle(title string) SwaggerOption