Documentation ¶
Index ¶
- func AllowCORS() gin.HandlerFunc
- func Authorize(cup CurrentUserProvider, 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 CurrentUserProvider
- type ServiceContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowCORS ¶
func AllowCORS() gin.HandlerFunc
func Authorize ¶
func Authorize(cup CurrentUserProvider, 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 ¶
Click to show internal directories.
Click to hide internal directories.