feat: Allow configuring global hooks via Kong's functional options (#511)

Lets you pass `kong.WithBeforeApply` along with a function that supports dynamic bindings to register a `BeforeApply` hook without tying it directly to a node in the schema.

Co-authored-by: Sutina Wipawiwat <swipawiwat@squareup.com>
This commit is contained in:
Bob Lail
2025-03-21 20:04:20 -07:00
committed by GitHub
parent 1edf069f4a
commit 78d4066dab
5 changed files with 127 additions and 5 deletions
+6
View File
@@ -1,5 +1,11 @@
package kong
// BeforeReset is a documentation-only interface describing hooks that run before defaults values are applied.
type BeforeReset interface {
// This is not the correct signature - see README for details.
BeforeReset(args ...any) error
}
// BeforeResolve is a documentation-only interface describing hooks that run before resolvers are applied.
type BeforeResolve interface {
// This is not the correct signature - see README for details.