Skip to content

Commit

Permalink
chore: fix out-dated document of ClientTupleKey (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Code2Life authored Aug 29, 2024
1 parent 0887f1c commit 74964e8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ By default, write runs in a transaction mode where any invalid operation (deleti

```golang
body := ClientWriteRequest{
Writes: &[]ClientTupleKey{ {
Writes: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "viewer",
Object: "document:roadmap",
Expand All @@ -516,7 +516,7 @@ body := ClientWriteRequest{
Relation: "viewer",
Object: "document:budget",
} },
Deletes: &[]ClientTupleKeyWithoutCondition{ {
Deletes: []ClientTupleKeyWithoutCondition{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "writer",
Object: "document:roadmap",
Expand All @@ -540,7 +540,7 @@ The SDK will split the writes into separate chunks and send them in separate req

```golang
body := ClientWriteRequest{
Writes: &[]ClientTupleKey{ {
Writes: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "viewer",
Object: "document:roadmap",
Expand All @@ -549,7 +549,7 @@ body := ClientWriteRequest{
Relation: "viewer",
Object: "document:budget",
} },
Deletes: &[]ClientTupleKeyWithoutCondition{ {
Deletes: []ClientTupleKeyWithoutCondition{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "writer",
Object: "document:roadmap",
Expand Down Expand Up @@ -601,7 +601,7 @@ body := ClientCheckRequest{
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "viewer",
Object: "document:roadmap",
ContextualTuples: &[]ClientTupleKey{ {
ContextualTuples: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "editor",
Object: "document:roadmap",
Expand Down Expand Up @@ -639,7 +639,7 @@ body := ClientBatchCheckBody{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "viewer",
Object: "document:roadmap",
ContextualTuples: &[]ClientTupleKey{ {
ContextualTuples: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "editor",
Object: "document:roadmap",
Expand All @@ -648,7 +648,7 @@ body := ClientBatchCheckBody{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "admin",
Object: "document:roadmap",
ContextualTuples: &[]ClientTupleKey{ {
ContextualTuples: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "editor",
Object: "document:roadmap",
Expand Down Expand Up @@ -752,7 +752,7 @@ body := ClientListObjectsRequest{
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "can_read",
Type: "document",
ContextualTuples: &[]ClientTupleKey{ {
ContextualTuples: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "editor",
Object: "folder:product",
Expand Down Expand Up @@ -787,7 +787,7 @@ body := ClientListRelationsRequest{
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Object: "document:roadmap",
Relations: []string{"can_view", "can_edit", "can_delete", "can_rename"},
ContextualTuples: &[]ClientTupleKey{ {
ContextualTuples: []ClientTupleKey{ {
User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
Relation: "editor",
Object: "document:roadmap",
Expand Down

0 comments on commit 74964e8

Please sign in to comment.