controller

package
v0.0.0-...-ca42a2b Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Conf    *drive2.Config  // 配置
	Redis   *goredis.Client // redis链接
	Monitor *drive2.Monitor // 监控数据
	Writer  http.ResponseWriter
	Request *http.Request
	Mysql   *gorm.DB // mysql链接
	Etcd    library.EtcdClient
}

func (*Controller) GetData

func (c *Controller) GetData() map[string]interface{}

获取get参数

func (*Controller) Json

func (c *Controller) Json(code int, errOk string, msg string, data ...interface{})

返回json数据

func (*Controller) PostData

func (c *Controller) PostData() map[string]interface{}

获取post参数

func (*Controller) Requests

func (c *Controller) Requests(writer http.ResponseWriter, request *http.Request)

http请求

func (*Controller) StopRun

func (c *Controller) StopRun()

中断流程继续

Jump to

Keyboard shortcuts

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