context

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 2 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)
}

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