Hi, I'm trying to use the latest version of the Ke...
# talk-keto
a
Hi, I'm trying to use the latest version of the Keto client in Go. I did:
go get <http://github.com/ory/keto/proto|github.com/ory/keto/proto>
which appears to have installed
v0.8.0-alpha.2
but I can't get the import to work...
Copy code
import (
	"<http://github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2|github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2>"
)
this fails:
could not import github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2 (no required module provides package "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2")
d
Hello. It installs a little bit different
Copy code
<http://github.com/ory/keto/proto/ory/keto/acl/v1alpha1@v0.8.0-alpha.2|github.com/ory/keto/proto/ory/keto/acl/v1alpha1@v0.8.0-alpha.2>
and then you can use
Copy code
package main
import (
	"<http://google.golang.org/grpc|google.golang.org/grpc>"
	acl "<http://github.com/ory/keto/proto/ory/keto/acl/v1alpha1|github.com/ory/keto/proto/ory/keto/acl/v1alpha1>"
)
func main() {
	conn, err := grpc.Dial("127.0.0.1:4467", grpc.WithInsecure())
	if err != nil {
		panic("Encountered error: " + err.Error())
	}
	writeClient := acl.NewWriteServiceClient(conn)
...
gratitude thank you 1
a
ah! I was getting confused between the
1
in
v1alpha1
and the
2
in
v0.8.0-alpha.2
d
Let me check it a little bit closer
a
It's working now, thanks! now in
go.mod
I have:
Copy code
require <http://github.com/ory/keto/proto|github.com/ory/keto/proto> v0.8.0-alpha.2
and I can use the latest things in my app:
Copy code
package main

import (
	"context"

	acl "<http://github.com/ory/keto/proto/ory/keto/acl/v1alpha1|github.com/ory/keto/proto/ory/keto/acl/v1alpha1>"
)

func main() {
	conn := struct{}{}
	cl := acl.NewWriteServiceClient(conn)

	cl.DeleteRelationTuples(context.Background(), &acl.DeleteRelationTuplesRequest{
		Query: &acl.DeleteRelationTuplesRequest_Query{},
	})
}
d
Nice. We’re refactoring Keto API Paths right now and they’ll be available on next release. Please stick to release tags.
👍 1
That was a cause in your case of broken package