router

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(handler func(c Context)) iris.Handler

Types

type Context

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

func (*Context) Application

func (c *Context) Application() context.Application

func (*Context) ClientIP

func (c *Context) ClientIP() string

func (*Context) GetBody

func (c *Context) GetBody() ([]byte, error)

func (*Context) GetContext

func (c *Context) GetContext(key string) interface{}

func (*Context) GetHeader

func (c *Context) GetHeader(key string) string

func (*Context) GetStatusCode

func (c *Context) GetStatusCode() int

func (*Context) Header

func (c *Context) Header(key string, value string)

func (*Context) JSON

func (c *Context) JSON(err error, data interface{}, meta *schema.Meta)

func (*Context) Next added in v0.4.0

func (c *Context) Next()

func (*Context) Param

func (c *Context) Param(key string) string

func (*Context) Redirect

func (c *Context) Redirect(status int, url string)

func (*Context) Request

func (c *Context) Request() *http.Request

func (*Context) ResetRequest

func (c *Context) ResetRequest(r *http.Request)

func (*Context) Response

func (c *Context) Response(err error, res schema.Response)

func (*Context) ResponseFunc

func (c *Context) ResponseFunc(err error, fn func() schema.Response)

func (*Context) SetContext

func (c *Context) SetContext(key string, value interface{})

func (*Context) ShouldBindJSON

func (c *Context) ShouldBindJSON(pr interface{}) error

func (*Context) ShouldBindQuery

func (c *Context) ShouldBindQuery(pr interface{}) error

func (*Context) StatusCode

func (c *Context) StatusCode(code int)

func (*Context) Uid

func (c *Context) Uid() string

func (*Context) Writer

func (c *Context) Writer() http.ResponseWriter

Jump to

Keyboard shortcuts

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