• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ory / keto / 10166504429

30 Jul 2024 04:53PM CUT coverage: 77.612%. First build
10166504429

Pull #1559

github

zepatrik
chore: bump ory/x
Pull Request #1559: chore: bump dependencies

5734 of 7388 relevant lines covered (77.61%)

489.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go
1
// Copyright © 2023 Ory Corp
2
// SPDX-License-Identifier: Apache-2.0
3

4
package main
5

6
import (
7
        "context"
8
        "fmt"
9

10
        rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2"
11

12
        "google.golang.org/grpc"
13
        "google.golang.org/grpc/credentials/insecure"
14
)
15

16
func main() {
×
17
        conn, err := grpc.Dial("127.0.0.1:4467", grpc.WithTransportCredentials(insecure.NewCredentials()))
×
18
        if err != nil {
×
19
                panic("Encountered error: " + err.Error())
×
20
        }
21

22
        client := rts.NewWriteServiceClient(conn)
×
23

×
24
        _, err = client.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{
×
25
                RelationTupleDeltas: []*rts.RelationTupleDelta{
×
26
                        {
×
27
                                Action: rts.RelationTupleDelta_ACTION_INSERT,
×
28
                                RelationTuple: &rts.RelationTuple{
×
29
                                        Namespace: "messages",
×
30
                                        Object:    "02y_15_4w350m3",
×
31
                                        Relation:  "decypher",
×
32
                                        Subject:   rts.NewSubjectID("john"),
×
33
                                },
×
34
                        },
×
35
                },
×
36
        })
×
37
        if err != nil {
×
38
                panic("Encountered error: " + err.Error())
×
39
        }
40

41
        fmt.Println("Successfully created tuple")
×
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc