test

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertionsTest

func AssertionsTest(t *testing.T, datastore storage.OpenFGADatastore)

func BootstrapFGAStore added in v1.5.4

func BootstrapFGAStore(
	t require.TestingT,
	ds storage.OpenFGADatastore,
	model string,
	tupleStrs []string,
) (string, *openfgav1.AuthorizationModel)

BootstrapFGAStore is a utility to write an FGA model and relationship tuples to a datastore. It doesn't validate the model. It validates the format of the tuples, but not the types within them. It returns the store_id and FGA AuthorizationModel, respectively.

func FindLatestAuthorizationModelTest added in v1.5.0

func FindLatestAuthorizationModelTest(t *testing.T, datastore storage.OpenFGADatastore)

func ReadAndReadPageTest added in v1.5.5

func ReadAndReadPageTest(t *testing.T, datastore storage.OpenFGADatastore)

func ReadAuthorizationModelsTest

func ReadAuthorizationModelsTest(t *testing.T, datastore storage.OpenFGADatastore)

func ReadChangesTest

func ReadChangesTest(t *testing.T, datastore storage.OpenFGADatastore)

func ReadStartingWithUserTest

func ReadStartingWithUserTest(t *testing.T, datastore storage.OpenFGADatastore)

func RunAllTests

func RunAllTests(t *testing.T, ds storage.OpenFGADatastore)

func StoreTest

func StoreTest(t *testing.T, datastore storage.OpenFGADatastore)

func TupleWritingAndReadingTest

func TupleWritingAndReadingTest(t *testing.T, datastore storage.OpenFGADatastore)

func WriteAndReadAuthorizationModelTest

func WriteAndReadAuthorizationModelTest(t *testing.T, datastore storage.OpenFGADatastore)

func WriteTuplesWithMaxTuplesPerWrite added in v1.10.0

func WriteTuplesWithMaxTuplesPerWrite(datastore storage.OpenFGADatastore, ctx context.Context) func(t *testing.T)

Types

type MapCache added in v1.11.4

type MapCache struct {
	// contains filtered or unexported fields
}

func NewMapCache added in v1.11.4

func NewMapCache() *MapCache

func (*MapCache) Calls added in v1.11.4

func (m *MapCache) Calls() int

func (*MapCache) Delete added in v1.11.4

func (m *MapCache) Delete(key string)

func (*MapCache) Get added in v1.11.4

func (m *MapCache) Get(key string) any

func (*MapCache) Hits added in v1.11.4

func (m *MapCache) Hits() int

func (*MapCache) Set added in v1.11.4

func (m *MapCache) Set(key string, value any, _ time.Duration)

func (*MapCache) Stop added in v1.11.4

func (m *MapCache) Stop()

Jump to

Keyboard shortcuts

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