context

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	context.Context
	ExtendedContext
}

Context is the interface of web app context

type ExtendedContext added in v0.11.0

type ExtendedContext interface {
	ResponseString(s string)
	ResponseBody(message string, data interface{})
	ResponseError(message string, code int)
	WrapHandler(h http.Handler)
	SetAnnotations(ann interface{})
	SetURLParam(name, value string)
	Annotations() interface{}
	InitResponses()
	SetResponse(idx int, response interface{})
	GetResponses() (responses []interface{})
	GetResponse(idx int) (response interface{})
}

ExtendedContext extended context

type Handler added in v1.5.0

type Handler func(Context)

Handler is the handler func type (for Middleware)

func NewHandler added in v1.5.0

func NewHandler(h iris.Handler) Handler

NewHandler will convert iris handler to our handler of func(*Context), in order to be compatible with the HTTP API.

Jump to

Keyboard shortcuts

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