controllers

package
v0.0.0-...-6c75c7c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoErr        = CtlResp{http.StatusOK, "OK", nil}
	Err404       = CtlResp{http.StatusNotFound, "资源不存在", nil}
	ErrInputData = CtlResp{http.StatusBadRequest, "输入参数异常", nil}
)

Functions

This section is empty.

Types

type BaseController

type BaseController struct {
	beego.Controller
}

func (*BaseController) RespInternalError

func (base *BaseController) RespInternalError(err error)

func (*BaseController) RespJson

func (base *BaseController) RespJson(ctlErr CtlResp)

func (*BaseController) VerifyInputData

func (base *BaseController) VerifyInputData(obj interface{}) (err error)

type CtlResp

type CtlResp struct {
	HttpCode int
	Message  string
	Body     interface{}
}

func (CtlResp) SetCode

func (r CtlResp) SetCode(code int) CtlResp

func (CtlResp) SetData

func (r CtlResp) SetData(data interface{}) CtlResp

func (CtlResp) SetMsg

func (r CtlResp) SetMsg(msg string) CtlResp

type HealthCheckController

type HealthCheckController struct {
	BaseController
}

Operations about object

func (*HealthCheckController) Get

func (c *HealthCheckController) Get()

@Title getEpBySrv @Description get dolphin health status @Success 200 {string} active @router /health [get]

type MainController

type MainController struct {
	beego.Controller
}

Operations about home page Operations about home page

func (*MainController) Get

func (c *MainController) Get()

@Title getEpBySrv @Description get nautilus home page @Success 200 {string} info @router / [get]

type ServerResp

type ServerResp struct {
	Code    string      `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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