controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REMOTE_REAL_IP_HEADER_KEY   = "REMOTE-REAL-IP"
	REMOTE_REAL_PORT_HEADER_KEY = "REMOTE-REAL-PORT"

	DOWNSTREAM_SERVER_IP = "127.0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseContext

type BaseContext struct {
	Req        *http.Request
	RespWriter http.ResponseWriter
	RespBody   []byte

	QueryValues    url.Values
	RemoteRealAddr struct {
		Ip   string
		Port string
	}
	Rid []byte

	LogFormater  golog.IFormater
	AccessLogger golog.ILogger
}

func (*BaseContext) AfterAction

func (b *BaseContext) AfterAction()

func (*BaseContext) BeforeAction

func (b *BaseContext) BeforeAction()

func (*BaseContext) Destruct

func (b *BaseContext) Destruct()

func (*BaseContext) Request

func (b *BaseContext) Request() *http.Request

func (*BaseContext) ResponseBody

func (b *BaseContext) ResponseBody() []byte

func (*BaseContext) ResponseWriter

func (b *BaseContext) ResponseWriter() http.ResponseWriter

func (*BaseContext) SetResponseBody

func (b *BaseContext) SetResponseBody(body []byte)

type BaseController

type BaseController struct {
}

func (*BaseController) NewActionContext

func (b *BaseController) NewActionContext(req *http.Request, respWriter http.ResponseWriter) controller.ActionContext

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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