Skip to content

Commit

Permalink
review comment - import variable renamed
Browse files Browse the repository at this point in the history
Signed-off-by: Janardhan Sharma <[email protected]>
  • Loading branch information
JanardhanSharma authored and Janardhan Sharma committed Apr 26, 2024
1 parent 060c592 commit 43f11eb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions filters/openpolicyagent/evaluation.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/open-policy-agent/opa/server"
"github.com/open-policy-agent/opa/tracing"
"github.com/opentracing/opentracing-go"
_struct "google.golang.org/protobuf/types/known/structpb"
pbstruct "google.golang.org/protobuf/types/known/structpb"
"time"
)

Expand Down Expand Up @@ -84,11 +84,11 @@ func metaDataContextDoesNotExist(req *ext_authz_v3.CheckRequest) bool {

func formFilterMetadata(decisionId string) *ext_authz_v3_core.Metadata {
metaData := &ext_authz_v3_core.Metadata{
FilterMetadata: map[string]*_struct.Struct{
FilterMetadata: map[string]*pbstruct.Struct{
"open_policy_agent": {
Fields: map[string]*_struct.Value{
Fields: map[string]*pbstruct.Value{
"decision_id": {
Kind: &_struct.Value_StringValue{StringValue: decisionId},
Kind: &pbstruct.Value_StringValue{StringValue: decisionId},
},
},
},
Expand All @@ -97,9 +97,9 @@ func formFilterMetadata(decisionId string) *ext_authz_v3_core.Metadata {
return metaData
}

func formOpenPolicyAgentMetaDataObject(decisionId string) *_struct.Struct {
nestedStruct := &_struct.Struct{}
nestedStruct.Fields = make(map[string]*_struct.Value)
func formOpenPolicyAgentMetaDataObject(decisionId string) *pbstruct.Struct {
nestedStruct := &pbstruct.Struct{}
nestedStruct.Fields = make(map[string]*pbstruct.Value)

innerFields := make(map[string]interface{})
innerFields["decision_id"] = decisionId
Expand Down

0 comments on commit 43f11eb

Please sign in to comment.