demo

package
v0.0.0-...-c9a36a8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apple

func Apple(r *ghttp.Request)

func ApplePen

func ApplePen(r *ghttp.Request)
func Cookie(r *ghttp.Request)

func Form

func Form(r *ghttp.Request)

func FormShow

func FormShow(r *ghttp.Request)

func Pen

func Pen(r *ghttp.Request)

func Session

func Session(r *ghttp.Request)

func Upload

func Upload(r *ghttp.Request)

func UploadShow

func UploadShow(r *ghttp.Request)

Types

type ControllerDomain

type ControllerDomain struct{}

func (*ControllerDomain) Show

func (d *ControllerDomain) Show(r *ghttp.Request)

用于对象映射

type ControllerExit

type ControllerExit struct {
	gmvc.Controller
}

func (*ControllerExit) Init

func (c *ControllerExit) Init(r *ghttp.Request)

func (*ControllerExit) Show

func (c *ControllerExit) Show()

type ControllerMethod

type ControllerMethod struct {
	gmvc.Controller
}

func (*ControllerMethod) Age

func (c *ControllerMethod) Age()

func (*ControllerMethod) Info

func (c *ControllerMethod) Info()

func (*ControllerMethod) Name

func (c *ControllerMethod) Name()

type ControllerRest

type ControllerRest struct {
	gmvc.Controller
}

测试控制器

func (*ControllerRest) Delete

func (c *ControllerRest) Delete()

RESTFul - DELETE

func (*ControllerRest) Get

func (c *ControllerRest) Get()

RESTFul - GET

func (*ControllerRest) Hello

func (c *ControllerRest) Hello()

该方法无法映射,将会无法访问到

func (*ControllerRest) Post

func (c *ControllerRest) Post()

RESTFul - POST

type ControllerRule

type ControllerRule struct {
	gmvc.Controller
}

func (*ControllerRule) Show

func (c *ControllerRule) Show()

type ControllerTemplate

type ControllerTemplate struct {
	gmvc.Controller
}

func (*ControllerTemplate) Info

func (c *ControllerTemplate) Info()

type ControllerUser

type ControllerUser struct {
	gmvc.Controller
}

定义业务相关的控制器对象, 建议命名规范中控制器统一使用Controller前缀,后期代码维护时便于区分

func (*ControllerUser) Age

func (c *ControllerUser) Age()

定义操作逻辑 - 展示年龄

func (*ControllerUser) Name

func (c *ControllerUser) Name()

定义操作逻辑 - 展示姓名

func (*ControllerUser) TrueName

func (c *ControllerUser) TrueName()

定义操作逻辑 - 展示方法名称如果带多个单词,路由控制器使用英文连接符号"-"进行拼接

type Object

type Object struct{}

func (*Object) Index

func (o *Object) Index(r *ghttp.Request)

func (*Object) Show

func (o *Object) Show(r *ghttp.Request)

type ObjectMethod

type ObjectMethod struct{}

func (*ObjectMethod) Show1

func (o *ObjectMethod) Show1(r *ghttp.Request)

func (*ObjectMethod) Show2

func (o *ObjectMethod) Show2(r *ghttp.Request)

func (*ObjectMethod) Show3

func (o *ObjectMethod) Show3(r *ghttp.Request)

func (*ObjectMethod) Show4

func (o *ObjectMethod) Show4(r *ghttp.Request)

type ObjectRest

type ObjectRest struct{}

测试绑定对象

func (*ObjectRest) Delete

func (c *ObjectRest) Delete(r *ghttp.Request)

RESTFul - DELETE

func (*ObjectRest) Get

func (o *ObjectRest) Get(r *ghttp.Request)

RESTFul - GET

func (*ObjectRest) Hello

func (c *ObjectRest) Hello(r *ghttp.Request)

该方法无法映射,将会无法访问到

func (*ObjectRest) Post

func (c *ObjectRest) Post(r *ghttp.Request)

RESTFul - POST

Jump to

Keyboard shortcuts

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