Documentation ¶
Index ¶
- func AllowCORS() gin.HandlerFunc
- func Authorize(cup CurrentUserProvider, tracker Tracker, isRequired ...bool) gin.HandlerFunc
- func AuthorizeWithCache(cup CurrentUserProvider, cache Caching, tracker Tracker, isRequired ...bool) gin.HandlerFunc
- func PanicLogger() gin.HandlerFunc
- func Recover(sc ServiceContext) gin.HandlerFunc
- func RecoveryWithWriter(out io.Writer) gin.HandlerFunc
- func RequireRoles(roles ...fmt.Stringer) gin.HandlerFunc
- type Caching
- type CurrentUserProvider
- type ServiceContext
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowCORS ¶
func AllowCORS() gin.HandlerFunc
func Authorize ¶
func Authorize(cup CurrentUserProvider, tracker Tracker, isRequired ...bool) gin.HandlerFunc
func AuthorizeWithCache ¶
func AuthorizeWithCache(cup CurrentUserProvider, cache Caching, tracker Tracker, isRequired ...bool) gin.HandlerFunc
func PanicLogger ¶
func PanicLogger() gin.HandlerFunc
func Recover ¶
func Recover(sc ServiceContext) gin.HandlerFunc
func RecoveryWithWriter ¶
func RecoveryWithWriter(out io.Writer) gin.HandlerFunc
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
func RequireRoles ¶
func RequireRoles(roles ...fmt.Stringer) gin.HandlerFunc
Types ¶
type CurrentUserProvider ¶
type ServiceContext ¶
Click to show internal directories.
Click to hide internal directories.