middlewares

package
v0.0.0-...-f6ca644 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(opt server.JwtOption) gin.HandlerFunc

Auth function

func AuthServer

func AuthServer(defaultOpt client.Http) gin.HandlerFunc

AuthServer function

func AuthenticatedHeader

func AuthenticatedHeader(c *gin.Context) bool

AuthenticatedHeader function

func BindJSON

func BindJSON(c *gin.Context, obj interface{}) error

BindJSON function

func CreateToken

func CreateToken(opt server.JwtOption, claims jwt.MapClaims) string

CreateToken function

func DbConnect

func DbConnect(c *gin.Context)

DbConnect function Connect middleware clones the database session for each request and makes the `db` object available for each handler

func ErrorHandler

func ErrorHandler(c *gin.Context)

ErrorHandler is a middleware to handle errors encountered during requests

func GetAuthorizedHeader

func GetAuthorizedHeader(r *http.Request) http.Header

GetAuthorizedHeader function

func GetToken

func GetToken(c *gin.Context)

GetToken function

func ProcessAuthResponse

func ProcessAuthResponse(c *gin.Context, body io.Reader)

ProcessAuthResponse function

Types

This section is empty.

Jump to

Keyboard shortcuts

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