tuple

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// MaxTuplesPerWrite Limit the tuples in a single batch.
	MaxTuplesPerWrite = 1

	// MaxParallelRequests Limit the parallel writes to the API.
	MaxParallelRequests = 10
)

Variables

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 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 int32,
	maxParallelRequests int32,
) (*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.

type ImportStats added in v0.6.3

type ImportStats struct {
	TotalTuples      int
	SuccessfulTuples int
	FailedTuples     int
}

Jump to

Keyboard shortcuts

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