context

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contexter

func Contexter() flamego.Handler

Contexter initializes a classic context for a request.

Types

type Context

type Context struct {
	flamego.Context
}

Context represents context of a request.

func (*Context) Error

func (c *Context) Error(errorCode uint, message string) error

func (*Context) Query

func (c *Context) Query(name string) string

Query queries form parameter.

func (*Context) QueryFloat64

func (c *Context) QueryFloat64(name string) float64

QueryFloat64 returns query result in float64 type.

func (*Context) QueryInt

func (c *Context) QueryInt(name string) int

QueryInt returns query result in int type.

func (*Context) QueryInt64

func (c *Context) QueryInt64(name string) int64

QueryInt64 returns query result in int64 type.

func (*Context) ServerError

func (c *Context) ServerError() error

func (*Context) Success

func (c *Context) Success(data ...interface{}) error

Jump to

Keyboard shortcuts

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