Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add gRPC client utils helpers (#657)
Behold! The Keto gRPC client library now has useful helpers that allow you to replace: ```diff - deltas := make([]*acl.RelationTupleDelta, len(tuples)) - for i := range rts { - deltas[i] = &acl.RelationTupleDelta{ - Action: acl.RelationTupleDelta_INSERT, - RelationTuple: rts[i], - } - } + deltas := acl.RelationTupleToDeltas(tuples, acl.RelationTupleDelta_INSERT) ``` and ```diff - &acl.Subject{Ref: &acl.Subject_Set{Set: &acl.SubjectSet{ - Namespace: "directories", - Object: "/photos", - Relation: "access", - }}} + acl.NewSubjectSet("directories", "/photos", "access") ``` and ```diff - &acl.Subject{Ref: &acl.Subject_Id{ - Id: "user1", - }} + acl.NewSubjectID("user1") ``` Enjoy these new treats 🍫 🍭 🍦
- Loading branch information
Showing
13 changed files
with
157 additions
and
2,431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.