proxy_test

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDatastore

type MockDatastore struct {
	mock.Mock
}

func (*MockDatastore) CheckRevision

func (dm *MockDatastore) CheckRevision(ctx context.Context, revision datastore.Revision) error

func (*MockDatastore) Close

func (dm *MockDatastore) Close() error

func (*MockDatastore) Features added in v1.11.0

func (dm *MockDatastore) Features(ctx context.Context) (*datastore.Features, error)

func (*MockDatastore) HeadRevision

func (dm *MockDatastore) HeadRevision(ctx context.Context) (datastore.Revision, error)

func (*MockDatastore) IsReady

func (dm *MockDatastore) IsReady(ctx context.Context) (bool, error)

func (*MockDatastore) OptimizedRevision

func (dm *MockDatastore) OptimizedRevision(ctx context.Context) (datastore.Revision, error)

func (*MockDatastore) ReadWriteTx

func (dm *MockDatastore) ReadWriteTx(
	ctx context.Context,
	f datastore.TxUserFunc,
) (datastore.Revision, error)

func (*MockDatastore) RevisionFromString added in v1.14.0

func (dm *MockDatastore) RevisionFromString(s string) (datastore.Revision, error)

func (*MockDatastore) SnapshotReader

func (dm *MockDatastore) SnapshotReader(rev datastore.Revision) datastore.Reader

func (*MockDatastore) Statistics

func (dm *MockDatastore) Statistics(ctx context.Context) (datastore.Stats, error)

func (*MockDatastore) Watch

func (dm *MockDatastore) Watch(ctx context.Context, afterRevision datastore.Revision) (<-chan *datastore.RevisionChanges, <-chan error)

type MockReadWriteTransaction

type MockReadWriteTransaction struct {
	mock.Mock
}

func (*MockReadWriteTransaction) DeleteCaveats added in v1.14.0

func (dm *MockReadWriteTransaction) DeleteCaveats(ctx context.Context, names []string) error

func (*MockReadWriteTransaction) DeleteNamespaces added in v1.14.0

func (dm *MockReadWriteTransaction) DeleteNamespaces(ctx context.Context, nsNames ...string) error

func (*MockReadWriteTransaction) DeleteRelationships

func (dm *MockReadWriteTransaction) DeleteRelationships(ctx context.Context, filter *v1.RelationshipFilter) error

func (*MockReadWriteTransaction) ListCaveats added in v1.14.0

func (dm *MockReadWriteTransaction) ListCaveats(ctx context.Context, caveatNames ...string) ([]*core.CaveatDefinition, error)

func (*MockReadWriteTransaction) ListNamespaces

func (dm *MockReadWriteTransaction) ListNamespaces(ctx context.Context) ([]*core.NamespaceDefinition, error)

func (*MockReadWriteTransaction) LookupNamespaces added in v1.13.0

func (dm *MockReadWriteTransaction) LookupNamespaces(ctx context.Context, nsNames []string) ([]*core.NamespaceDefinition, error)

func (*MockReadWriteTransaction) QueryRelationships

func (*MockReadWriteTransaction) ReadCaveatByName added in v1.14.0

func (*MockReadWriteTransaction) ReadNamespace

func (*MockReadWriteTransaction) ReverseQueryRelationships

func (dm *MockReadWriteTransaction) ReverseQueryRelationships(
	ctx context.Context,
	subjectsFilter datastore.SubjectsFilter,
	options ...options.ReverseQueryOptionsOption,
) (datastore.RelationshipIterator, error)

func (*MockReadWriteTransaction) WriteCaveats added in v1.14.0

func (dm *MockReadWriteTransaction) WriteCaveats(ctx context.Context, caveats []*core.CaveatDefinition) error

func (*MockReadWriteTransaction) WriteNamespaces

func (dm *MockReadWriteTransaction) WriteNamespaces(ctx context.Context, newConfigs ...*core.NamespaceDefinition) error

func (*MockReadWriteTransaction) WriteRelationships

func (dm *MockReadWriteTransaction) WriteRelationships(ctx context.Context, mutations []*core.RelationTupleUpdate) error

type MockReader

type MockReader struct {
	mock.Mock
}

func (*MockReader) ListCaveats added in v1.14.0

func (dm *MockReader) ListCaveats(ctx context.Context, caveatNames ...string) ([]*core.CaveatDefinition, error)

func (*MockReader) ListNamespaces

func (dm *MockReader) ListNamespaces(ctx context.Context) ([]*core.NamespaceDefinition, error)

func (*MockReader) LookupNamespaces added in v1.13.0

func (dm *MockReader) LookupNamespaces(ctx context.Context, nsNames []string) ([]*core.NamespaceDefinition, error)

func (*MockReader) QueryRelationships

func (*MockReader) ReadCaveatByName added in v1.14.0

func (dm *MockReader) ReadCaveatByName(ctx context.Context, name string) (*core.CaveatDefinition, datastore.Revision, error)

func (*MockReader) ReadNamespace

func (dm *MockReader) ReadNamespace(
	ctx context.Context,
	nsName string,
) (*core.NamespaceDefinition, datastore.Revision, error)

func (*MockReader) ReverseQueryRelationships

func (dm *MockReader) ReverseQueryRelationships(
	ctx context.Context,
	subjectsFilter datastore.SubjectsFilter,
	options ...options.ReverseQueryOptionsOption,
) (datastore.RelationshipIterator, error)

Jump to

Keyboard shortcuts

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