Documentation ¶
Index ¶
- func Handler[T any](handler HandlerFunc[T]) gin.HandlerFunc
- func Init(_contextDependence ContextDependence)
- func InitInternalContext(_internalContextDependence InternalContextDependence)
- func InternalHandler(handler InternalHandlerFunc) gin.HandlerFunc
- func MatchLanguage(header string, tags []string) []string
- func NoSecurityHandler(handler NoSecurityHandlerFunc) gin.HandlerFunc
- func ParseAuthorizationBearerHeader(authHeader string) string
- type Context
- type ContextDependence
- type CustomLogic
- type HandlerFunc
- type InternalContext
- type InternalContextDependence
- type InternalHandlerFunc
- type NoSecurityContext
- type NoSecurityHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler[T any](handler HandlerFunc[T]) gin.HandlerFunc
func Init ¶
func Init(_contextDependence ContextDependence)
func InitInternalContext ¶
func InitInternalContext(_internalContextDependence InternalContextDependence)
func InternalHandler ¶
func InternalHandler(handler InternalHandlerFunc) gin.HandlerFunc
func MatchLanguage ¶
func NoSecurityHandler ¶
func NoSecurityHandler(handler NoSecurityHandlerFunc) gin.HandlerFunc
func ParseAuthorizationBearerHeader ¶
ParseAuthorizationBearerHeader Parse HTTP Authorization header with Bearer credentials. Return an empty string when parsing fails.
See also: https://datatracker.ietf.org/doc/html/rfc6750#section-2.1
Types ¶
type ContextDependence ¶
type ContextDependence struct { Auther auth.Authable CustomLogic CustomLogic }
type HandlerFunc ¶
type InternalContext ¶
type InternalContextDependence ¶
type InternalContextDependence struct { AuthorizationToken string CustomLogic CustomLogic }
type InternalHandlerFunc ¶
type InternalHandlerFunc func(ctx *InternalContext)
type NoSecurityContext ¶
type NoSecurityHandlerFunc ¶
type NoSecurityHandlerFunc func(ctx *NoSecurityContext)
Click to show internal directories.
Click to hide internal directories.