controllers

package
v0.0.0-...-77cf2aa Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HomeController

type HomeController struct {
	mvc.Controller
}

HomeController 实现mvc控制器的处理Main为控制器 {Controller}的值

func (*HomeController) Finish

func (c *HomeController) Finish()

Finish 控制器结束时调用

func (*HomeController) LayoutTestGet

func (c *HomeController) LayoutTestGet(Test *Test)

所以实际路由为:/任意字符串/main/layoutTest/任意字符串er

func (*HomeController) My1

func (c *HomeController) My1()

My1为{Action}的值 该方法的默认路由为/Home/My1 get请求可以省略get后缀 查询具体字符串值可到httpContext包中查看

func (*HomeController) My2

func (c *HomeController) My2()

func (*HomeController) MyControllerActionStrut

func (c *HomeController) MyControllerActionStrut(Test *Test)

MyControllerActionStrut为{Action}的值 该方法的默认路由为/Home/MyControllerActionStrut 最后的单词为请求方式 该例子为Post请求

func (*HomeController) MyGET

func (c *HomeController) MyGET(Test *Test)

My{Action}的值 该方法的默认路由为/Home/My 最后的单词为请求方式该例子为Get请求 查询具体字符串值可到httpContext包中查看 重定向使用方法

func (*HomeController) Prepare

func (c *HomeController) Prepare()

type Test

type Test struct {
	T  []*string `json:"tt"`
	T1 string    `json:"tstst1"`
	Id bool      `json:"id"`
}

作为 Action的请求参数的映射值

Jump to

Keyboard shortcuts

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