middleware

package
v0.0.0-...-ce5851c Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTMiddleware

type JWTMiddleware struct {
	Logger *logrus.Logger
	Option *NewJWTMiddlewareOption
}

func NewJWTMiddleware

func NewJWTMiddleware(option *NewJWTMiddlewareOption) *JWTMiddleware

func (*JWTMiddleware) OnRequest

func (m *JWTMiddleware) OnRequest(ctx *haruka.Context)

type NewJWTMiddlewareOption

type NewJWTMiddlewareOption struct {
	ReadTokenString func(ctx *haruka.Context) string
	HeaderLookUp    string
	ParamLookUp     string
	GetClaims       func() jwt.Claims
	JWTKey          []byte
}

type PaginationMiddleware

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

func NewPaginationMiddleware

func NewPaginationMiddleware(pageLookUp string, pageSizeLookUp string, defaultPage int, defaultPageSize int) *PaginationMiddleware

func (*PaginationMiddleware) OnRequest

func (p *PaginationMiddleware) OnRequest(ctx *haruka.Context)

type RequestLoggerMiddleware

type RequestLoggerMiddleware struct {
	Logger *logrus.Logger
}

func NewLoggerMiddleware

func NewLoggerMiddleware() *RequestLoggerMiddleware

func (*RequestLoggerMiddleware) OnRequest

func (r *RequestLoggerMiddleware) OnRequest(ctx *haruka.Context)

Jump to

Keyboard shortcuts

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