github openfga/go-sdk v0.0.2

latest releases: v0.6.3, v0.6.2, v0.6.1...
2 years ago

0.0.2 (2022-08-15)

Support for ListObjects API

You call the API and receive the list of object ids from a particular type that the user has a certain relation with.

For example, to find the list of documents that Anne can read:

body := openfga.ListObjectsRequest{
 AuthorizationModelId: PtrString(""),
 User: PtrString("anne"),
 Relation: PtrString("can_view"),
 Type: PtrString("document"),
}
data, response, err := apiClient.OpenFgaApi.ListObjects(context.Background()).Body(body).Execute()

// response.object_ids = ["roadmap"]

Don't miss a new go-sdk release

NewReleases is sending notifications on new releases.