From 9ea7644d2ab9ce726214ea8d763961b4297dff2b Mon Sep 17 00:00:00 2001 From: SimFG Date: Tue, 17 Oct 2023 10:19:57 +0800 Subject: [PATCH] Add VerifyAPIKey method for the hook interface Signed-off-by: SimFG --- go-api/hook/hook.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go-api/hook/hook.go b/go-api/hook/hook.go index a5ea6ed..7de14f7 100644 --- a/go-api/hook/hook.go +++ b/go-api/hook/hook.go @@ -4,6 +4,7 @@ import "context" type Hook interface { Init(params map[string]string) error + VerifyAPIKey(key string) (string, error) Mock(ctx context.Context, req interface{}, fullMethod string) (bool, interface{}, error) Before(ctx context.Context, req interface{}, fullMethod string) (context.Context, error) After(ctx context.Context, result interface{}, err error, fullMethod string) error