Documentation ¶
Overview ¶
Package tuple contains commands that interact directly with stored relationship tuples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MaxParallelRequests = 10
MaxParallelRequests Limit the parallel writes to the API.
var MaxReadChangesPagesLength = 20
MaxReadChangesPagesLength Limit the changes so that we are not paginating indefinitely.
var MaxReadPagesLength = 20
MaxReadPagesLength Limit the tuples so that we are not paginating indefinitely.
var MaxTuplesPerWrite = 1
MaxTuplesPerWrite Limit the tuples in a single batch.
var TupleCmd = &cobra.Command{
Use: "tuple",
Short: "Interact with Relationship Tuples",
Long: "Read, write, delete, import and listen to changes in relationship tuples in a store.",
}
TupleCmd represents the tuple command.
Functions ¶
func ExactArgsOrFlag ¶ added in v0.1.2
func ExactArgsOrFlag(n int, flag string) cobra.PositionalArgs
Types ¶
type ImportResponse ¶ added in v0.2.2
type ImportResponse struct { Successful []client.ClientTupleKey `json:"successful"` Failed []failedWriteResponse `json:"failed"` }
func ImportTuples ¶ added in v0.2.2
func ImportTuples( fgaClient client.SdkClient, body client.ClientWriteRequest, maxTuplesPerWrite int, maxParallelRequests int, ) (*ImportResponse, error)
ImportTuples receives a client.ClientWriteRequest and imports the tuples to the store. It can be used to import either writes or deletes. It returns a pointer to an ImportResponse and an error. The ImportResponse contains the tuples that were successfully imported and the tuples that failed to be imported. Deletes and writes are put together in the same ImportResponse.