http

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHttpHandle

func AddHttpHandle(f intercept.HttpIntercept)

func DoHttp

func DoHttp(rw http.ResponseWriter, req *http.Request)

func NewApiIntercept

func NewApiIntercept(match def.Match, caller def.Caller, serialize def.Serialize) intercept.HttpIntercept

func RegisterErrorHandler

func RegisterErrorHandler(p reflect.Type, handler ErrorHandler)

func RegisterReturnHandler

func RegisterReturnHandler(ret def.RetAdapter)

func WriteError

func WriteError(err interface{}, rw http.ResponseWriter)

func WriteResponse

func WriteResponse(rw http.ResponseWriter, req *http.Request, content *def.Content)

func WriteRetResponse

func WriteRetResponse(rw http.ResponseWriter, req *http.Request, adapter def.RetAdapter)

Types

type ApiInter

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

func (*ApiInter) Http

func (api *ApiInter) Http(rw http.ResponseWriter, req *http.Request) bool

func (*ApiInter) NotFindPath

func (api *ApiInter) NotFindPath(rw http.ResponseWriter, req *http.Request)

func (*ApiInter) Order

func (api *ApiInter) Order() int

type ErrorHandler

type ErrorHandler func(err interface{}) interface{}

type Handles

type Handles []intercept.HttpIntercept

Jump to

Keyboard shortcuts

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