handler

package
v0.0.0-...-de72672 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchRunPanic

func CatchRunPanic()

CatchRunPanic Capture exceptions generated during framework startup process

func NewHandle

func NewHandle() http.Handler

func SetAllowedHeaders

func SetAllowedHeaders(s []string)

func SetAllowedMethods

func SetAllowedMethods(s []string)

func SetAllowedOrigin

func SetAllowedOrigin(s string)

func SetErrHandleFunc

func SetErrHandleFunc(fun ErrHandleFunc)

SetErrHandleFunc Set global exception handling functions

func SetIntercept

func SetIntercept(i Interceptor)

func SetPostProcess

func SetPostProcess(p PostProcessor)

Types

type ErrHandleFunc

type ErrHandleFunc func(err any) any

ErrHandleFunc Abstract Method

type Files

type Files map[string][]*multipart.FileHeader

type Interceptor

type Interceptor func(http.ResponseWriter, *http.Request) bool

Interceptor Abstract Method Returning true indicates a release request, while false indicates the opposite.

type PostProcessor

type PostProcessor func(v any) any

PostProcessor Abstract Method The routing function is called when the return value is finished processing data.

Jump to

Keyboard shortcuts

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