controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func Register

func Register(area string, c IController)

Register 自动注册控制器下的所有Action方法

Types

type Action added in v0.2.0

type Action struct {
	Method string // POST/GET/PUT/DELETE
	Params string // 函数的入参名称
}

type BaseController

type BaseController struct {
	HttpContext context.HttpContext // 上下文
	Action      map[string]Action   // 设置每个Action参数
}

type HandleMiddleware added in v0.2.0

type HandleMiddleware struct {
}

func (HandleMiddleware) Invoke added in v0.2.0

func (receiver HandleMiddleware) Invoke(httpContext *context.HttpContext)

type IActionFilter added in v0.2.0

type IActionFilter interface {
	// OnActionExecuting Action执行前
	OnActionExecuting()
	// OnActionExecuted Action执行后
	OnActionExecuted()
}

IActionFilter 过滤器

type IController

type IController interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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