hook

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	PostParamsParseHooks   []*reflect.Value
	PostMethodExecuteHooks []*reflect.Value
	PreMethodExecuteHooks  []*reflect.Value
}

func (*Hook) GenHook

func (hook *Hook) GenHook(rcvr *reflect.Value) *Hook

GenHook see handle#AddHook

func (*Hook) HasMethodExecuteHook

func (hook *Hook) HasMethodExecuteHook() bool

func (*Hook) HasPreMethodExecuteHooks

func (hook *Hook) HasPreMethodExecuteHooks() bool

func (*Hook) PostMethodExecuteHook

func (hook *Hook) PostMethodExecuteHook(param reflect.Value) (data any, err error)

func (*Hook) PostParamsParse

func (hook *Hook) PostParamsParse(param reflect.Value) (err error)

func (*Hook) PreMethodExecuteHook

func (hook *Hook) PreMethodExecuteHook(ctx reflect.Value) (err error)

type PostMethodExecuteHook

type PostMethodExecuteHook interface {
	PostMethodExecuteHook(param any) (data any, err error)
}

PostMethodExecuteHook Hook triggered after method execution but before returning

type PostParamsParseHook

type PostParamsParseHook interface {
	PostParamsParseHook(param any) error
}

PostParamsParseHook Hook triggered after parameter parsing is complete

type PostRouteMountHook

type PostRouteMountHook interface {
	PostRouteMount()
}

PostRouteMountHook Hook triggered after route is mounted

type PreMethodExecuteHooks

type PreMethodExecuteHooks interface {
	PreMethodExecuteHook(ctx context.Ctx) (err error)
}

PreMethodExecuteHooks Hook triggered before method execution but before returning

type PreRouteSetupHook

type PreRouteSetupHook interface {
	PreRouteSetup()
}

Jump to

Keyboard shortcuts

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