tuple

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package tuple contains commands that interact directly with stored relationship tuples.

Index

Constants

This section is empty.

Variables

View Source
var MaxParallelRequests = 10

MaxParallelRequests Limit the parallel writes to the API.

View Source
var MaxReadChangesPagesLength = 20

MaxReadChangesPagesLength Limit the changes so that we are not paginating indefinitely.

View Source
var MaxReadPagesLength = 20

MaxReadPagesLength Limit the tuples so that we are not paginating indefinitely.

View Source
var MaxTuplesPerWrite = 1

MaxTuplesPerWrite Limit the tuples in a single batch.

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL