Documentation ¶
Index ¶
- func LoggerMiddleware(logger *zap.Logger) gin.HandlerFunc
- type Middleware
- func (mw *Middleware) AdminOnly() gin.HandlerFunc
- func (mw *Middleware) CheckSession() gin.HandlerFunc
- func (mw *Middleware) GeneralOnly() gin.HandlerFunc
- func (mw *Middleware) IdentifyUUID(key string) gin.HandlerFunc
- func (mw *Middleware) SetClubSlugKey() gin.HandlerFunc
- func (mw *Middleware) SetClubUUIDKey() gin.HandlerFunc
- func (mw *Middleware) SetImageIDKey() gin.HandlerFunc
- func (mw *Middleware) SetIsRestrictedSession() gin.HandlerFunc
- func (mw *Middleware) SetThumbnailIDKey() gin.HandlerFunc
- func (mw *Middleware) SetUserUUIDKey() gin.HandlerFunc
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
Click to show internal directories.
Click to hide internal directories.