middleware

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors() *cors

Cors return cors

func Download

func Download() *download

Download return download

func Favicon

func Favicon(file string, fs *embed.FS) *favicon

Favicon return favicon

func GetSession

func GetSession(ctx *context.Context) se.Session

GetSession get current session

func Header() *header

Header return header

func Logger

func Logger() *logger

Logger return logger

func Session

func Session(provider se.Provider, config *se.Config, listener *se.Listener) *session

Session return new session

func Static

func Static(cache bool, root, prefix string) *static

Static new static

func Upload

func Upload() *upload

Upload return upload

Types

type Middleware

type Middleware interface {
	Handler() func(ctx *context.Context)
}

Middleware interface

func Recovery

func Recovery(handlers ...func(ctx *context.Context)) Middleware

Recovery return new recovery

func RecoveryWithConfig

func RecoveryWithConfig(codeName string, codeVal int, msgName string, handlers ...func(ctx *context.Context)) Middleware

RecoveryWithConfig return new recovery

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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