Documentation
¶
Index ¶
- func AssertionsTest(t *testing.T, datastore storage.OpenFGADatastore)
- func BootstrapFGAStore(t require.TestingT, ds storage.OpenFGADatastore, model string, ...) (string, *openfgav1.AuthorizationModel)
- func FindLatestAuthorizationModelTest(t *testing.T, datastore storage.OpenFGADatastore)
- func ReadAndReadPageTest(t *testing.T, datastore storage.OpenFGADatastore)
- func ReadAuthorizationModelsTest(t *testing.T, datastore storage.OpenFGADatastore)
- func ReadChangesTest(t *testing.T, datastore storage.OpenFGADatastore)
- func ReadStartingWithUserTest(t *testing.T, datastore storage.OpenFGADatastore)
- func RunAllTests(t *testing.T, ds storage.OpenFGADatastore)
- func StoreTest(t *testing.T, datastore storage.OpenFGADatastore)
- func TupleWritingAndReadingTest(t *testing.T, datastore storage.OpenFGADatastore)
- func WriteAndReadAuthorizationModelTest(t *testing.T, datastore storage.OpenFGADatastore)
- func WriteTuplesWithMaxTuplesPerWrite(datastore storage.OpenFGADatastore, ctx context.Context) func(t *testing.T)
- type MapCache
- func (m *MapCache) Calls() int
- func (m *MapCache) Delete(key string)
- func (m *MapCache) Get(key string) any
- func (m *MapCache) Hits() int
- func (m *MapCache) KeysWithPrefix(prefix string) []string
- func (m *MapCache) Set(key string, value any, _ time.Duration)
- func (m *MapCache) Size() int
- func (m *MapCache) Stop()
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 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
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) KeysWithPrefix ¶ added in v1.14.1
KeysWithPrefix returns all keys in the cache that start with the given prefix.
Click to show internal directories.
Click to hide internal directories.