controllers

package
v0.0.0-...-b58bbae Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URLFor

func URLFor(endpoint string, values ...interface{}) string

去除URLFor生成的URL前缀

Types

type BaseController

type BaseController struct {
	beego.Controller
	i18n.Locale

	Module string
}

控制器基类

func (*BaseController) Msg

func (this *BaseController) Msg(msg string, args ...interface{})

提示信息

func (*BaseController) OutJson

func (this *BaseController) OutJson(args ...interface{})

json数据输出

func (*BaseController) Prepare

func (this *BaseController) Prepare()

初始化操作

func (*BaseController) SetPaginator

func (this *BaseController) SetPaginator(per int, nums int64) *utils.Paginator

设置分页

func (*BaseController) View

func (this *BaseController) View(tpl string)

模板封装处理 *

  • @api POST /user/:id get user

type JSONResponse

type JSONResponse struct {
	Ret   interface{} `json:"ret"`
	Msg   interface{} `json:"msg"`
	Data  interface{} `json:"data"`
	URL   interface{} `json:"url"`
	IsTop interface{} `json:"is_top"`
}

Directories

Path Synopsis
m

Jump to

Keyboard shortcuts

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