mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 07:11:02 +00:00
switch on req type
This commit is contained in:
parent
22a60a19f8
commit
70b1ef906f
1 changed files with 10 additions and 1 deletions
|
|
@ -1655,7 +1655,16 @@ func Valid(ctx context.Context, method string, auth *authn.Auth, req interface{}
|
|||
if !ok {
|
||||
ua = []string{""}
|
||||
}
|
||||
logger.Infof("GRPC: %v, %v, %v, %v, %v, %v", ip, ua, method, uinfo.UserID, uinfo.UserName, req)
|
||||
|
||||
switch r := req.(type) {
|
||||
case *pb.QueryPQLRequest:
|
||||
logger.Infof("GRPC: %v, %v, %v, %v, %v, %+v", ip, ua, method, uinfo.UserID, uinfo.UserName, r)
|
||||
case *pb.QuerySQLRequest:
|
||||
logger.Infof("GRPC: %v, %v, %v, %v, %v, %+v", ip, ua, method, uinfo.UserID, uinfo.UserName, r)
|
||||
default:
|
||||
logger.Infof("GRPC: %v, %v, %v, %v, %v, %v", ip, ua, method, uinfo.UserID, uinfo.UserName)
|
||||
|
||||
}
|
||||
|
||||
return context.WithValue(ctx, "userinfo", uinfo), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue