context

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

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 {
	//RequestBody(data interface{}) error
	//RequestForm(data interface{}) error
	//RequestParams(request interface{}) error
	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{}
}

ExtendedContext extended context

type Handler added in v1.0.2

type Handler func(Context)

Handler is the handler func type (for Middleware)

func NewHandler added in v1.0.2

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