Documentation
¶
Index ¶
- func AddPing(router *gin.Engine, buildNumber string)
- func InitTracer(prefix string, router *gin.Engine) func(context.Context) error
- func NonTxMiddleware() gin.HandlerFunc
- func SecurityMiddleware(rolesAllowed []string, ...) gin.HandlerFunc
- func Setup(prefix string)
- func TimingMiddleware(c *gin.Context)
- func TxMiddleware() gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPing ¶
================================================================================================ ping ================================================================================================ https://quarkus.io/guides/smallrye-health https://www.reddit.com/r/kubernetes/comments/wayj42/what_should_readiness_liveness_probe_actually/
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 TimingMiddleware ¶
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.