hook

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PostJetCtxInitHooks = make([]func(ctx context.Ctx), 0)
)

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) HasPostMethodExecuteHook added in v0.0.3

func (hook *Hook) HasPostMethodExecuteHook() 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