Documentation ¶
Index ¶
- type Controller
- func (c *Controller) GetData() map[string]interface{}
- func (c *Controller) Json(code int, errOk string, msg string, data ...interface{})
- func (c *Controller) PostData() map[string]interface{}
- func (c *Controller) Requests(writer http.ResponseWriter, request *http.Request)
- func (c *Controller) StopRun()
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) Json ¶
func (c *Controller) Json(code int, errOk string, msg string, data ...interface{})
返回json数据
func (*Controller) Requests ¶
func (c *Controller) Requests(writer http.ResponseWriter, request *http.Request)
http请求
Click to show internal directories.
Click to hide internal directories.