Skip to content

Commit

Permalink
Fix GetRelation validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh committed Jan 15, 2024
1 parent b006e8e commit 8301968
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go 1.20
require (
github.com/Masterminds/semver v1.5.0
github.com/aserto-dev/aserto-grpc v0.2.2
github.com/aserto-dev/azm v0.0.18-0.20240115220008-a188ebaf19f0
github.com/aserto-dev/azm v0.0.18-0.20240115224901-ba17d4698b57
github.com/aserto-dev/errors v0.0.6
github.com/aserto-dev/go-directory v0.30.10
github.com/bufbuild/protovalidate-go v0.4.3
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ github.com/aserto-dev/aserto-grpc v0.2.2 h1:i6rWdvydyqs7eBqsZHYdPPCC+xVwQve8KrBg
github.com/aserto-dev/aserto-grpc v0.2.2/go.mod h1:uDMB5njLdoCa0Hr+TOg6A4gH85uNqTvufkM5sKtEjcE=
github.com/aserto-dev/azm v0.0.18-0.20240115220008-a188ebaf19f0 h1:brplf7zeAOiPuKls+DiSvOGwXSUizo+7fZBgW1sXhvU=
github.com/aserto-dev/azm v0.0.18-0.20240115220008-a188ebaf19f0/go.mod h1:m42yapoABuB2D+I+699p85AOhEZsvPaUrJWIQVQ2XgY=
github.com/aserto-dev/azm v0.0.18-0.20240115224901-ba17d4698b57 h1:zI7zX5swsQOlANJ4hQE1gjtXWt3H8cF7WHi68NK+ePM=
github.com/aserto-dev/azm v0.0.18-0.20240115224901-ba17d4698b57/go.mod h1:m42yapoABuB2D+I+699p85AOhEZsvPaUrJWIQVQ2XgY=
github.com/aserto-dev/errors v0.0.6 h1:iH5fkJwBGFPbcdS4B8mwvNdwODlhDEXXPduZtjLh6vo=
github.com/aserto-dev/errors v0.0.6/go.mod h1:kenI1gamsemaR2wS+M2un0kXIJ9exTrmeRT/fCFwlWc=
github.com/aserto-dev/go-directory v0.30.10 h1:g4j5lzNndQOG6Uv+oc1Q4UzyZdtgCnGftHNIpahzcos=
Expand Down Expand Up @@ -113,6 +115,7 @@ github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 h1:dOYG7LS/WK00RWZc8XGgcUTlTxpp3mKhdR2Q9z9HbXM=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c=
Expand Down Expand Up @@ -248,6 +251,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
5 changes: 3 additions & 2 deletions pkg/ds/relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ type relations struct {

func Relation(i *dsc3.Relation) *relation { return &relation{safe.Relation(i)} }

func GetRelation(i *dsr3.GetRelationRequest) *relation {
return &relation{safe.GetRelation(i)}
func GetRelation(i *dsr3.GetRelationRequest) *relations {
r := safe.GetRelation(i)
return &relations{r, relation{r.SafeRelation}}
}

func GetRelations(i *dsr3.GetRelationsRequest) *relations {
Expand Down

0 comments on commit 8301968

Please sign in to comment.