middlewares

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerMiddleware

func LoggerMiddleware(logger *zap.Logger) gin.HandlerFunc

LoggerMiddleware アクセスごとにログを記録する.

基本的には "github.com/gin-contrib/zap" と同じ処理だが, 標準時を JST に強制変換させている.

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

func NewMiddleware

func NewMiddleware(config *config.MiddlewareConfig, logger *zap.Logger, repo repos.IRepository) *Middleware

func (*Middleware) AdminOnly

func (mw *Middleware) AdminOnly() gin.HandlerFunc

func (*Middleware) CheckSession

func (mw *Middleware) CheckSession() gin.HandlerFunc

func (*Middleware) GeneralOnly

func (mw *Middleware) GeneralOnly() gin.HandlerFunc

func (*Middleware) IdentifyUUID

func (mw *Middleware) IdentifyUUID(key string) gin.HandlerFunc

func (*Middleware) SetClubSlugKey

func (mw *Middleware) SetClubSlugKey() gin.HandlerFunc

func (*Middleware) SetClubUUIDKey

func (mw *Middleware) SetClubUUIDKey() gin.HandlerFunc

func (*Middleware) SetImageIDKey

func (mw *Middleware) SetImageIDKey() gin.HandlerFunc

func (*Middleware) SetIsRestrictedSession

func (mw *Middleware) SetIsRestrictedSession() gin.HandlerFunc

func (*Middleware) SetThumbnailIDKey

func (mw *Middleware) SetThumbnailIDKey() gin.HandlerFunc

func (*Middleware) SetUserUUIDKey

func (mw *Middleware) SetUserUUIDKey() gin.HandlerFunc

Jump to

Keyboard shortcuts

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