MCPcopy
hub / github.com/pocketbase/pocketbase / NewTaggedHook

Function NewTaggedHook

tools/hook/tagged.go:21–26  ·  view source on GitHub ↗

NewTaggedHook creates a new TaggedHook with the provided main hook and optional tags.

(hook *Hook[T], tags ...string)

Source from the content-addressed store, hash-verified

19
20// NewTaggedHook creates a new TaggedHook with the provided main hook and optional tags.
21func NewTaggedHook[T Tagger](hook *Hook[T], tags ...string) *TaggedHook[T] {
22 return &TaggedHook[T]{
23 mainHook[T]{hook},
24 tags,
25 }
26}
27
28// TaggedHook defines a proxy hook which register handlers that are triggered only
29// if the TaggedHook.tags are empty or includes at least one of the event data tag(s).

Callers 15

OnModelCreateMethod · 0.92
OnModelCreateExecuteMethod · 0.92
OnModelUpdateMethod · 0.92
OnModelUpdateExecuteMethod · 0.92
OnModelValidateMethod · 0.92
OnModelDeleteMethod · 0.92
OnModelDeleteExecuteMethod · 0.92

Calls

no outgoing calls

Tested by 1

TestTaggedHookFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…