framework_gin

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPing

func AddPing(router *gin.Engine, buildNumber string)

================================================================================================ ping ================================================================================================ https://quarkus.io/guides/smallrye-health https://www.reddit.com/r/kubernetes/comments/wayj42/what_should_readiness_liveness_probe_actually/

func InitTracer

func InitTracer(prefix string, router *gin.Engine) func(context.Context) error

func NonTxMiddleware

func NonTxMiddleware() gin.HandlerFunc

================================================================================================================================ normal middleware that encapsulates a non-transaction call, but still puts the DB into the context, just without a transaction ================================================================================================================================

func SecurityMiddleware

func SecurityMiddleware(rolesAllowed []string, contextProvider func(fwctx.ICtx, string) (jwt.UserContext, string, string, []string, error)) gin.HandlerFunc

================================================================================================================================ security middleware that ensures the user in the ICtx has one of the required roles which ultimately comes out of a JWT that has been verified. An optional contextProvider can be provided to handle service users. ================================================================================================================================

func Setup

func Setup(prefix string)

func TimingMiddleware

func TimingMiddleware(c *gin.Context)

func TxMiddleware

func TxMiddleware() gin.HandlerFunc

========================================================================================================================= normal middleware that encapsulates a transaction (cannot write headers after call to .next() -> see timing middleware =========================================================================================================================

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL