middleware

package
v0.0.0-...-d6791e1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AuthorizeMiddlewareWithRight

func AuthorizeMiddlewareWithRight(right ...auth.Right) echo.MiddlewareFunc

func ErrorHandler

func ErrorHandler(err error, c echo.Context)

func HttpCacheMiddleware

func HttpCacheMiddleware(ttl ...time.Duration) echo.MiddlewareFunc

func SuccessHandlerMiddleware

func SuccessHandlerMiddleware() echo.MiddlewareFunc

Types

type CtxResp

type CtxResp struct {
	echo.Context
}

func (*CtxResp) BulkResponse

func (c *CtxResp) BulkResponse(data []any) error

func (*CtxResp) CreatedResponse

func (c *CtxResp) CreatedResponse() error

func (*CtxResp) DeletedResponse

func (c *CtxResp) DeletedResponse() error

func (*CtxResp) PaginateResponse

func (c *CtxResp) PaginateResponse(data any, page, perPage int, total ...int) error

func (*CtxResp) SingleResponse

func (c *CtxResp) SingleResponse(data any) error

func (*CtxResp) UpdatedResponse

func (c *CtxResp) UpdatedResponse() error

Jump to

Keyboard shortcuts

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