middlewares

package
v0.0.0-...-edb9ed9 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerMiddleware

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

func NewLoggerMiddleware

func NewLoggerMiddleware() (loggerM *LoggerMiddleware)

func (*LoggerMiddleware) Process

func (loggerM *LoggerMiddleware) Process(req *api.Request, resp *api.Response, tr *Tracker) (err error)

type Middleware

type Middleware interface {
	Process(*api.Request, *api.Response, *Tracker) error
}

type MiddlewareStack

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

func NewMiddlewareStack

func NewMiddlewareStack(db *models.DB) (ms *MiddlewareStack)

func (*MiddlewareStack) Add

func (ms *MiddlewareStack) Add(middleware Middleware)

func (*MiddlewareStack) Exec

func (ms *MiddlewareStack) Exec(ctx context.Context, c *gin.Context, handler api.ApiHandlerFunc) (err error)

type Tracker

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

func NewTracker

func NewTracker(ms *MiddlewareStack, req *api.Request, resp *api.Response, handler api.ApiHandlerFunc) (tr *Tracker)

func (*Tracker) Exec

func (tr *Tracker) Exec() (err error)

func (*Tracker) Next

func (tr *Tracker) Next() (err error)

func (*Tracker) Start

func (tr *Tracker) Start() (err error)

Jump to

Keyboard shortcuts

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