Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMiddleware ¶
type AuthMiddleware struct { OptionService service.OptionService OneTimeTokenService service.OneTimeTokenService UserService service.UserService Cache cache.Cache }
func NewAuthMiddleware ¶
func NewAuthMiddleware(optionService service.OptionService, oneTimeTokenService service.OneTimeTokenService, cache cache.Cache, userService service.UserService) *AuthMiddleware
func (*AuthMiddleware) GetWrapHandler ¶
func (a *AuthMiddleware) GetWrapHandler() gin.HandlerFunc
type CacheControlMiddleware ¶
func NewCacheControlMiddleware ¶
func NewCacheControlMiddleware(opts ...CacheControlOption) *CacheControlMiddleware
func (*CacheControlMiddleware) CacheControl ¶
func (c *CacheControlMiddleware) CacheControl() gin.HandlerFunc
type CacheControlOption ¶
type CacheControlOption func(*CacheControlMiddleware)
func WithMaxAge ¶
func WithMaxAge(maxAge time.Duration) CacheControlOption
func WithPublic ¶
func WithPublic(public bool) CacheControlOption
type GinLoggerConfig ¶
type GinLoggerConfig struct { // SkipPaths is an url path array which logs are not written. // Optional. SkipPaths []string }
GinLoggerConfig LoggerConfig defines the config for Logger middleware
type GinLoggerMiddleware ¶
type GinLoggerMiddleware struct {
// contains filtered or unexported fields
}
func NewGinLoggerMiddleware ¶
func NewGinLoggerMiddleware(logger *zap.Logger) *GinLoggerMiddleware
func (*GinLoggerMiddleware) LoggerWithConfig ¶
func (g *GinLoggerMiddleware) LoggerWithConfig(conf GinLoggerConfig) gin.HandlerFunc
LoggerWithConfig instance a Logger middleware with config.
type InstallRedirectMiddleware ¶
type InstallRedirectMiddleware struct {
// contains filtered or unexported fields
}
func NewInstallRedirectMiddleware ¶
func NewInstallRedirectMiddleware(optionService service.OptionService) *InstallRedirectMiddleware
func (*InstallRedirectMiddleware) InstallRedirect ¶
func (i *InstallRedirectMiddleware) InstallRedirect() gin.HandlerFunc
type RecoveryMiddleware ¶
type RecoveryMiddleware struct {
// contains filtered or unexported fields
}
func NewRecoveryMiddleware ¶
func NewRecoveryMiddleware(logger *zap.Logger) *RecoveryMiddleware
func (*RecoveryMiddleware) RecoveryWithLogger ¶
func (r *RecoveryMiddleware) RecoveryWithLogger() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.