From 9c8fbfd0ba933ad43689a5eff1d625a60c5c21e8 Mon Sep 17 00:00:00 2001
From: aoiasd <zhicheng.yue@zilliz.com>
Date: Fri, 29 Nov 2024 18:19:27 +0800
Subject: [PATCH] Support push info to hook

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
---
 go-api/hook/hook.go | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/go-api/hook/hook.go b/go-api/hook/hook.go
index ed34eafa..94936e79 100644
--- a/go-api/hook/hook.go
+++ b/go-api/hook/hook.go
@@ -1,6 +1,8 @@
 package hook
 
-import "context"
+import (
+	"context"
+)
 
 type Hook interface {
 	Init(params map[string]string) error
@@ -11,6 +13,15 @@ type Hook interface {
 	Release()
 }
 
+type LogInfo interface {
+	GetFields(fields []string) map[string]any
+}
+
 type Extension interface {
 	Report(info any) int
+	ReportRefused(ctx context.Context, req interface{}, resp interface{}, err error, fullMethod string) error
 }
+
+type HookContextKeyType string
+
+const GinParamsKey = HookContextKeyType("gin_params")