mocks

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorTupleIterator added in v1.4.2

func NewErrorTupleIterator(tuples []*openfgav1.Tuple) storage.TupleIterator

NewErrorTupleIterator mocks case where Next will return error after the first Next() This TupleIterator is designed to be used in tests.

func NewMockOidcServer

func NewMockOidcServer(issuerURL string) (*mockOidcServer, error)

NewMockOidcServer creates a mock OIDC server with the given issuer URL and a random private key. You must call Stop afterward.

func NewMockSlowDataStorage

func NewMockSlowDataStorage(ds storage.OpenFGADatastore, readTuplesDelay time.Duration) storage.OpenFGADatastore

NewMockSlowDataStorage returns a wrapper of a datastore that adds artificial delays into the reads of tuples.

func NewMockTracingServer

func NewMockTracingServer(t testing.TB, port int) *mockTracingServer

Types

type MockAssertionsBackend

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

MockAssertionsBackend is a mock of AssertionsBackend interface.

func NewMockAssertionsBackend

func NewMockAssertionsBackend(ctrl *gomock.Controller) *MockAssertionsBackend

NewMockAssertionsBackend creates a new mock instance.

func (*MockAssertionsBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAssertionsBackend) ReadAssertions

func (m *MockAssertionsBackend) ReadAssertions(ctx context.Context, store, modelID string) ([]*openfgav1.Assertion, error)

ReadAssertions mocks base method.

func (*MockAssertionsBackend) WriteAssertions

func (m *MockAssertionsBackend) WriteAssertions(ctx context.Context, store, modelID string, assertions []*openfgav1.Assertion) error

WriteAssertions mocks base method.

type MockAssertionsBackendMockRecorder

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

MockAssertionsBackendMockRecorder is the mock recorder for MockAssertionsBackend.

func (*MockAssertionsBackendMockRecorder) ReadAssertions

func (mr *MockAssertionsBackendMockRecorder) ReadAssertions(ctx, store, modelID any) *gomock.Call

ReadAssertions indicates an expected call of ReadAssertions.

func (*MockAssertionsBackendMockRecorder) WriteAssertions

func (mr *MockAssertionsBackendMockRecorder) WriteAssertions(ctx, store, modelID, assertions any) *gomock.Call

WriteAssertions indicates an expected call of WriteAssertions.

type MockAuthorizationModelBackend

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

MockAuthorizationModelBackend is a mock of AuthorizationModelBackend interface.

func NewMockAuthorizationModelBackend

func NewMockAuthorizationModelBackend(ctrl *gomock.Controller) *MockAuthorizationModelBackend

NewMockAuthorizationModelBackend creates a new mock instance.

func (*MockAuthorizationModelBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthorizationModelBackend) FindLatestAuthorizationModel added in v1.5.0

func (m *MockAuthorizationModelBackend) FindLatestAuthorizationModel(ctx context.Context, store string) (*openfgav1.AuthorizationModel, error)

FindLatestAuthorizationModel mocks base method.

func (*MockAuthorizationModelBackend) MaxTypesPerAuthorizationModel

func (m *MockAuthorizationModelBackend) MaxTypesPerAuthorizationModel() int

MaxTypesPerAuthorizationModel mocks base method.

func (*MockAuthorizationModelBackend) ReadAuthorizationModel

func (m *MockAuthorizationModelBackend) ReadAuthorizationModel(ctx context.Context, store, id string) (*openfgav1.AuthorizationModel, error)

ReadAuthorizationModel mocks base method.

func (*MockAuthorizationModelBackend) ReadAuthorizationModels

func (m *MockAuthorizationModelBackend) ReadAuthorizationModels(ctx context.Context, store string, options storage.PaginationOptions) ([]*openfgav1.AuthorizationModel, []byte, error)

ReadAuthorizationModels mocks base method.

func (*MockAuthorizationModelBackend) WriteAuthorizationModel

func (m *MockAuthorizationModelBackend) WriteAuthorizationModel(ctx context.Context, store string, model *openfgav1.AuthorizationModel) error

WriteAuthorizationModel mocks base method.

type MockAuthorizationModelBackendMockRecorder

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

MockAuthorizationModelBackendMockRecorder is the mock recorder for MockAuthorizationModelBackend.

func (*MockAuthorizationModelBackendMockRecorder) FindLatestAuthorizationModel added in v1.5.0

func (mr *MockAuthorizationModelBackendMockRecorder) FindLatestAuthorizationModel(ctx, store any) *gomock.Call

FindLatestAuthorizationModel indicates an expected call of FindLatestAuthorizationModel.

func (*MockAuthorizationModelBackendMockRecorder) MaxTypesPerAuthorizationModel

func (mr *MockAuthorizationModelBackendMockRecorder) MaxTypesPerAuthorizationModel() *gomock.Call

MaxTypesPerAuthorizationModel indicates an expected call of MaxTypesPerAuthorizationModel.

func (*MockAuthorizationModelBackendMockRecorder) ReadAuthorizationModel

func (mr *MockAuthorizationModelBackendMockRecorder) ReadAuthorizationModel(ctx, store, id any) *gomock.Call

ReadAuthorizationModel indicates an expected call of ReadAuthorizationModel.

func (*MockAuthorizationModelBackendMockRecorder) ReadAuthorizationModels

func (mr *MockAuthorizationModelBackendMockRecorder) ReadAuthorizationModels(ctx, store, options any) *gomock.Call

ReadAuthorizationModels indicates an expected call of ReadAuthorizationModels.

func (*MockAuthorizationModelBackendMockRecorder) WriteAuthorizationModel

func (mr *MockAuthorizationModelBackendMockRecorder) WriteAuthorizationModel(ctx, store, model any) *gomock.Call

WriteAuthorizationModel indicates an expected call of WriteAuthorizationModel.

type MockAuthorizationModelReadBackend

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

MockAuthorizationModelReadBackend is a mock of AuthorizationModelReadBackend interface.

func NewMockAuthorizationModelReadBackend

func NewMockAuthorizationModelReadBackend(ctrl *gomock.Controller) *MockAuthorizationModelReadBackend

NewMockAuthorizationModelReadBackend creates a new mock instance.

func (*MockAuthorizationModelReadBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthorizationModelReadBackend) FindLatestAuthorizationModel added in v1.5.0

func (m *MockAuthorizationModelReadBackend) FindLatestAuthorizationModel(ctx context.Context, store string) (*openfgav1.AuthorizationModel, error)

FindLatestAuthorizationModel mocks base method.

func (*MockAuthorizationModelReadBackend) ReadAuthorizationModel

func (m *MockAuthorizationModelReadBackend) ReadAuthorizationModel(ctx context.Context, store, id string) (*openfgav1.AuthorizationModel, error)

ReadAuthorizationModel mocks base method.

func (*MockAuthorizationModelReadBackend) ReadAuthorizationModels

ReadAuthorizationModels mocks base method.

type MockAuthorizationModelReadBackendMockRecorder

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

MockAuthorizationModelReadBackendMockRecorder is the mock recorder for MockAuthorizationModelReadBackend.

func (*MockAuthorizationModelReadBackendMockRecorder) FindLatestAuthorizationModel added in v1.5.0

func (mr *MockAuthorizationModelReadBackendMockRecorder) FindLatestAuthorizationModel(ctx, store any) *gomock.Call

FindLatestAuthorizationModel indicates an expected call of FindLatestAuthorizationModel.

func (*MockAuthorizationModelReadBackendMockRecorder) ReadAuthorizationModel

func (mr *MockAuthorizationModelReadBackendMockRecorder) ReadAuthorizationModel(ctx, store, id any) *gomock.Call

ReadAuthorizationModel indicates an expected call of ReadAuthorizationModel.

func (*MockAuthorizationModelReadBackendMockRecorder) ReadAuthorizationModels

func (mr *MockAuthorizationModelReadBackendMockRecorder) ReadAuthorizationModels(ctx, store, options any) *gomock.Call

ReadAuthorizationModels indicates an expected call of ReadAuthorizationModels.

type MockChangelogBackend

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

MockChangelogBackend is a mock of ChangelogBackend interface.

func NewMockChangelogBackend

func NewMockChangelogBackend(ctrl *gomock.Controller) *MockChangelogBackend

NewMockChangelogBackend creates a new mock instance.

func (*MockChangelogBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockChangelogBackend) ReadChanges

func (m *MockChangelogBackend) ReadChanges(ctx context.Context, store, objectType string, paginationOptions storage.PaginationOptions, horizonOffset time.Duration) ([]*openfgav1.TupleChange, []byte, error)

ReadChanges mocks base method.

type MockChangelogBackendMockRecorder

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

MockChangelogBackendMockRecorder is the mock recorder for MockChangelogBackend.

func (*MockChangelogBackendMockRecorder) ReadChanges

func (mr *MockChangelogBackendMockRecorder) ReadChanges(ctx, store, objectType, paginationOptions, horizonOffset any) *gomock.Call

ReadChanges indicates an expected call of ReadChanges.

type MockEncoder added in v1.5.5

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

MockEncoder is a mock of Encoder interface.

func NewMockEncoder added in v1.5.5

func NewMockEncoder(ctrl *gomock.Controller) *MockEncoder

NewMockEncoder creates a new mock instance.

func (*MockEncoder) Decode added in v1.5.5

func (m *MockEncoder) Decode(arg0 string) ([]byte, error)

Decode mocks base method.

func (*MockEncoder) EXPECT added in v1.5.5

func (m *MockEncoder) EXPECT() *MockEncoderMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEncoder) Encode added in v1.5.5

func (m *MockEncoder) Encode(arg0 []byte) (string, error)

Encode mocks base method.

type MockEncoderMockRecorder added in v1.5.5

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

MockEncoderMockRecorder is the mock recorder for MockEncoder.

func (*MockEncoderMockRecorder) Decode added in v1.5.5

func (mr *MockEncoderMockRecorder) Decode(arg0 any) *gomock.Call

Decode indicates an expected call of Decode.

func (*MockEncoderMockRecorder) Encode added in v1.5.5

func (mr *MockEncoderMockRecorder) Encode(arg0 any) *gomock.Call

Encode indicates an expected call of Encode.

type MockOpenFGADatastore

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

MockOpenFGADatastore is a mock of OpenFGADatastore interface.

func NewMockOpenFGADatastore

func NewMockOpenFGADatastore(ctrl *gomock.Controller) *MockOpenFGADatastore

NewMockOpenFGADatastore creates a new mock instance.

func (*MockOpenFGADatastore) Close

func (m *MockOpenFGADatastore) Close()

Close mocks base method.

func (*MockOpenFGADatastore) CreateStore

func (m *MockOpenFGADatastore) CreateStore(ctx context.Context, store *openfgav1.Store) (*openfgav1.Store, error)

CreateStore mocks base method.

func (*MockOpenFGADatastore) DeleteStore

func (m *MockOpenFGADatastore) DeleteStore(ctx context.Context, id string) error

DeleteStore mocks base method.

func (*MockOpenFGADatastore) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOpenFGADatastore) FindLatestAuthorizationModel added in v1.5.0

func (m *MockOpenFGADatastore) FindLatestAuthorizationModel(ctx context.Context, store string) (*openfgav1.AuthorizationModel, error)

FindLatestAuthorizationModel mocks base method.

func (*MockOpenFGADatastore) GetStore

func (m *MockOpenFGADatastore) GetStore(ctx context.Context, id string) (*openfgav1.Store, error)

GetStore mocks base method.

func (*MockOpenFGADatastore) IsReady

IsReady mocks base method.

func (*MockOpenFGADatastore) ListStores

func (m *MockOpenFGADatastore) ListStores(ctx context.Context, paginationOptions storage.PaginationOptions) ([]*openfgav1.Store, []byte, error)

ListStores mocks base method.

func (*MockOpenFGADatastore) MaxTuplesPerWrite

func (m *MockOpenFGADatastore) MaxTuplesPerWrite() int

MaxTuplesPerWrite mocks base method.

func (*MockOpenFGADatastore) MaxTypesPerAuthorizationModel

func (m *MockOpenFGADatastore) MaxTypesPerAuthorizationModel() int

MaxTypesPerAuthorizationModel mocks base method.

func (*MockOpenFGADatastore) Read

Read mocks base method.

func (*MockOpenFGADatastore) ReadAssertions

func (m *MockOpenFGADatastore) ReadAssertions(ctx context.Context, store, modelID string) ([]*openfgav1.Assertion, error)

ReadAssertions mocks base method.

func (*MockOpenFGADatastore) ReadAuthorizationModel

func (m *MockOpenFGADatastore) ReadAuthorizationModel(ctx context.Context, store, id string) (*openfgav1.AuthorizationModel, error)

ReadAuthorizationModel mocks base method.

func (*MockOpenFGADatastore) ReadAuthorizationModels

func (m *MockOpenFGADatastore) ReadAuthorizationModels(ctx context.Context, store string, options storage.PaginationOptions) ([]*openfgav1.AuthorizationModel, []byte, error)

ReadAuthorizationModels mocks base method.

func (*MockOpenFGADatastore) ReadChanges

func (m *MockOpenFGADatastore) ReadChanges(ctx context.Context, store, objectType string, paginationOptions storage.PaginationOptions, horizonOffset time.Duration) ([]*openfgav1.TupleChange, []byte, error)

ReadChanges mocks base method.

func (*MockOpenFGADatastore) ReadPage

func (m *MockOpenFGADatastore) ReadPage(ctx context.Context, store string, tupleKey *openfgav1.TupleKey, paginationOptions storage.PaginationOptions) ([]*openfgav1.Tuple, []byte, error)

ReadPage mocks base method.

func (*MockOpenFGADatastore) ReadStartingWithUser

ReadStartingWithUser mocks base method.

func (*MockOpenFGADatastore) ReadUserTuple

func (m *MockOpenFGADatastore) ReadUserTuple(ctx context.Context, store string, tupleKey *openfgav1.TupleKey) (*openfgav1.Tuple, error)

ReadUserTuple mocks base method.

func (*MockOpenFGADatastore) ReadUsersetTuples

ReadUsersetTuples mocks base method.

func (*MockOpenFGADatastore) Write

Write mocks base method.

func (*MockOpenFGADatastore) WriteAssertions

func (m *MockOpenFGADatastore) WriteAssertions(ctx context.Context, store, modelID string, assertions []*openfgav1.Assertion) error

WriteAssertions mocks base method.

func (*MockOpenFGADatastore) WriteAuthorizationModel

func (m *MockOpenFGADatastore) WriteAuthorizationModel(ctx context.Context, store string, model *openfgav1.AuthorizationModel) error

WriteAuthorizationModel mocks base method.

type MockOpenFGADatastoreMockRecorder

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

MockOpenFGADatastoreMockRecorder is the mock recorder for MockOpenFGADatastore.

func (*MockOpenFGADatastoreMockRecorder) Close

Close indicates an expected call of Close.

func (*MockOpenFGADatastoreMockRecorder) CreateStore

func (mr *MockOpenFGADatastoreMockRecorder) CreateStore(ctx, store any) *gomock.Call

CreateStore indicates an expected call of CreateStore.

func (*MockOpenFGADatastoreMockRecorder) DeleteStore

func (mr *MockOpenFGADatastoreMockRecorder) DeleteStore(ctx, id any) *gomock.Call

DeleteStore indicates an expected call of DeleteStore.

func (*MockOpenFGADatastoreMockRecorder) FindLatestAuthorizationModel added in v1.5.0

func (mr *MockOpenFGADatastoreMockRecorder) FindLatestAuthorizationModel(ctx, store any) *gomock.Call

FindLatestAuthorizationModel indicates an expected call of FindLatestAuthorizationModel.

func (*MockOpenFGADatastoreMockRecorder) GetStore

func (mr *MockOpenFGADatastoreMockRecorder) GetStore(ctx, id any) *gomock.Call

GetStore indicates an expected call of GetStore.

func (*MockOpenFGADatastoreMockRecorder) IsReady

func (mr *MockOpenFGADatastoreMockRecorder) IsReady(ctx any) *gomock.Call

IsReady indicates an expected call of IsReady.

func (*MockOpenFGADatastoreMockRecorder) ListStores

func (mr *MockOpenFGADatastoreMockRecorder) ListStores(ctx, paginationOptions any) *gomock.Call

ListStores indicates an expected call of ListStores.

func (*MockOpenFGADatastoreMockRecorder) MaxTuplesPerWrite

func (mr *MockOpenFGADatastoreMockRecorder) MaxTuplesPerWrite() *gomock.Call

MaxTuplesPerWrite indicates an expected call of MaxTuplesPerWrite.

func (*MockOpenFGADatastoreMockRecorder) MaxTypesPerAuthorizationModel

func (mr *MockOpenFGADatastoreMockRecorder) MaxTypesPerAuthorizationModel() *gomock.Call

MaxTypesPerAuthorizationModel indicates an expected call of MaxTypesPerAuthorizationModel.

func (*MockOpenFGADatastoreMockRecorder) Read

func (mr *MockOpenFGADatastoreMockRecorder) Read(ctx, store, tupleKey any) *gomock.Call

Read indicates an expected call of Read.

func (*MockOpenFGADatastoreMockRecorder) ReadAssertions

func (mr *MockOpenFGADatastoreMockRecorder) ReadAssertions(ctx, store, modelID any) *gomock.Call

ReadAssertions indicates an expected call of ReadAssertions.

func (*MockOpenFGADatastoreMockRecorder) ReadAuthorizationModel

func (mr *MockOpenFGADatastoreMockRecorder) ReadAuthorizationModel(ctx, store, id any) *gomock.Call

ReadAuthorizationModel indicates an expected call of ReadAuthorizationModel.

func (*MockOpenFGADatastoreMockRecorder) ReadAuthorizationModels

func (mr *MockOpenFGADatastoreMockRecorder) ReadAuthorizationModels(ctx, store, options any) *gomock.Call

ReadAuthorizationModels indicates an expected call of ReadAuthorizationModels.

func (*MockOpenFGADatastoreMockRecorder) ReadChanges

func (mr *MockOpenFGADatastoreMockRecorder) ReadChanges(ctx, store, objectType, paginationOptions, horizonOffset any) *gomock.Call

ReadChanges indicates an expected call of ReadChanges.

func (*MockOpenFGADatastoreMockRecorder) ReadPage

func (mr *MockOpenFGADatastoreMockRecorder) ReadPage(ctx, store, tupleKey, paginationOptions any) *gomock.Call

ReadPage indicates an expected call of ReadPage.

func (*MockOpenFGADatastoreMockRecorder) ReadStartingWithUser

func (mr *MockOpenFGADatastoreMockRecorder) ReadStartingWithUser(ctx, store, filter any) *gomock.Call

ReadStartingWithUser indicates an expected call of ReadStartingWithUser.

func (*MockOpenFGADatastoreMockRecorder) ReadUserTuple

func (mr *MockOpenFGADatastoreMockRecorder) ReadUserTuple(ctx, store, tupleKey any) *gomock.Call

ReadUserTuple indicates an expected call of ReadUserTuple.

func (*MockOpenFGADatastoreMockRecorder) ReadUsersetTuples

func (mr *MockOpenFGADatastoreMockRecorder) ReadUsersetTuples(ctx, store, filter any) *gomock.Call

ReadUsersetTuples indicates an expected call of ReadUsersetTuples.

func (*MockOpenFGADatastoreMockRecorder) Write

func (mr *MockOpenFGADatastoreMockRecorder) Write(ctx, store, d, w any) *gomock.Call

Write indicates an expected call of Write.

func (*MockOpenFGADatastoreMockRecorder) WriteAssertions

func (mr *MockOpenFGADatastoreMockRecorder) WriteAssertions(ctx, store, modelID, assertions any) *gomock.Call

WriteAssertions indicates an expected call of WriteAssertions.

func (*MockOpenFGADatastoreMockRecorder) WriteAuthorizationModel

func (mr *MockOpenFGADatastoreMockRecorder) WriteAuthorizationModel(ctx, store, model any) *gomock.Call

WriteAuthorizationModel indicates an expected call of WriteAuthorizationModel.

type MockRelationshipTupleReader

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

MockRelationshipTupleReader is a mock of RelationshipTupleReader interface.

func NewMockRelationshipTupleReader

func NewMockRelationshipTupleReader(ctrl *gomock.Controller) *MockRelationshipTupleReader

NewMockRelationshipTupleReader creates a new mock instance.

func (*MockRelationshipTupleReader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRelationshipTupleReader) Read

Read mocks base method.

func (*MockRelationshipTupleReader) ReadPage

func (m *MockRelationshipTupleReader) ReadPage(ctx context.Context, store string, tupleKey *openfgav1.TupleKey, paginationOptions storage.PaginationOptions) ([]*openfgav1.Tuple, []byte, error)

ReadPage mocks base method.

func (*MockRelationshipTupleReader) ReadStartingWithUser

ReadStartingWithUser mocks base method.

func (*MockRelationshipTupleReader) ReadUserTuple

func (m *MockRelationshipTupleReader) ReadUserTuple(ctx context.Context, store string, tupleKey *openfgav1.TupleKey) (*openfgav1.Tuple, error)

ReadUserTuple mocks base method.

func (*MockRelationshipTupleReader) ReadUsersetTuples

ReadUsersetTuples mocks base method.

type MockRelationshipTupleReaderMockRecorder

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

MockRelationshipTupleReaderMockRecorder is the mock recorder for MockRelationshipTupleReader.

func (*MockRelationshipTupleReaderMockRecorder) Read

func (mr *MockRelationshipTupleReaderMockRecorder) Read(ctx, store, tupleKey any) *gomock.Call

Read indicates an expected call of Read.

func (*MockRelationshipTupleReaderMockRecorder) ReadPage

func (mr *MockRelationshipTupleReaderMockRecorder) ReadPage(ctx, store, tupleKey, paginationOptions any) *gomock.Call

ReadPage indicates an expected call of ReadPage.

func (*MockRelationshipTupleReaderMockRecorder) ReadStartingWithUser

func (mr *MockRelationshipTupleReaderMockRecorder) ReadStartingWithUser(ctx, store, filter any) *gomock.Call

ReadStartingWithUser indicates an expected call of ReadStartingWithUser.

func (*MockRelationshipTupleReaderMockRecorder) ReadUserTuple

func (mr *MockRelationshipTupleReaderMockRecorder) ReadUserTuple(ctx, store, tupleKey any) *gomock.Call

ReadUserTuple indicates an expected call of ReadUserTuple.

func (*MockRelationshipTupleReaderMockRecorder) ReadUsersetTuples

func (mr *MockRelationshipTupleReaderMockRecorder) ReadUsersetTuples(ctx, store, filter any) *gomock.Call

ReadUsersetTuples indicates an expected call of ReadUsersetTuples.

type MockRelationshipTupleWriter

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

MockRelationshipTupleWriter is a mock of RelationshipTupleWriter interface.

func NewMockRelationshipTupleWriter

func NewMockRelationshipTupleWriter(ctrl *gomock.Controller) *MockRelationshipTupleWriter

NewMockRelationshipTupleWriter creates a new mock instance.

func (*MockRelationshipTupleWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRelationshipTupleWriter) MaxTuplesPerWrite

func (m *MockRelationshipTupleWriter) MaxTuplesPerWrite() int

MaxTuplesPerWrite mocks base method.

func (*MockRelationshipTupleWriter) Write

Write mocks base method.

type MockRelationshipTupleWriterMockRecorder

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

MockRelationshipTupleWriterMockRecorder is the mock recorder for MockRelationshipTupleWriter.

func (*MockRelationshipTupleWriterMockRecorder) MaxTuplesPerWrite

func (mr *MockRelationshipTupleWriterMockRecorder) MaxTuplesPerWrite() *gomock.Call

MaxTuplesPerWrite indicates an expected call of MaxTuplesPerWrite.

func (*MockRelationshipTupleWriterMockRecorder) Write

func (mr *MockRelationshipTupleWriterMockRecorder) Write(ctx, store, d, w any) *gomock.Call

Write indicates an expected call of Write.

type MockStoresBackend

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

MockStoresBackend is a mock of StoresBackend interface.

func NewMockStoresBackend

func NewMockStoresBackend(ctrl *gomock.Controller) *MockStoresBackend

NewMockStoresBackend creates a new mock instance.

func (*MockStoresBackend) CreateStore

func (m *MockStoresBackend) CreateStore(ctx context.Context, store *openfgav1.Store) (*openfgav1.Store, error)

CreateStore mocks base method.

func (*MockStoresBackend) DeleteStore

func (m *MockStoresBackend) DeleteStore(ctx context.Context, id string) error

DeleteStore mocks base method.

func (*MockStoresBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStoresBackend) GetStore

func (m *MockStoresBackend) GetStore(ctx context.Context, id string) (*openfgav1.Store, error)

GetStore mocks base method.

func (*MockStoresBackend) ListStores

func (m *MockStoresBackend) ListStores(ctx context.Context, paginationOptions storage.PaginationOptions) ([]*openfgav1.Store, []byte, error)

ListStores mocks base method.

type MockStoresBackendMockRecorder

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

MockStoresBackendMockRecorder is the mock recorder for MockStoresBackend.

func (*MockStoresBackendMockRecorder) CreateStore

func (mr *MockStoresBackendMockRecorder) CreateStore(ctx, store any) *gomock.Call

CreateStore indicates an expected call of CreateStore.

func (*MockStoresBackendMockRecorder) DeleteStore

func (mr *MockStoresBackendMockRecorder) DeleteStore(ctx, id any) *gomock.Call

DeleteStore indicates an expected call of DeleteStore.

func (*MockStoresBackendMockRecorder) GetStore

func (mr *MockStoresBackendMockRecorder) GetStore(ctx, id any) *gomock.Call

GetStore indicates an expected call of GetStore.

func (*MockStoresBackendMockRecorder) ListStores

func (mr *MockStoresBackendMockRecorder) ListStores(ctx, paginationOptions any) *gomock.Call

ListStores indicates an expected call of ListStores.

type MockThrottler added in v1.5.4

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

MockThrottler is a mock of Throttler interface.

func NewMockThrottler added in v1.5.4

func NewMockThrottler(ctrl *gomock.Controller) *MockThrottler

NewMockThrottler creates a new mock instance.

func (*MockThrottler) Close added in v1.5.4

func (m *MockThrottler) Close()

Close mocks base method.

func (*MockThrottler) EXPECT added in v1.5.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockThrottler) Throttle added in v1.5.4

func (m *MockThrottler) Throttle(arg0 context.Context)

Throttle mocks base method.

type MockThrottlerMockRecorder added in v1.5.4

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

MockThrottlerMockRecorder is the mock recorder for MockThrottler.

func (*MockThrottlerMockRecorder) Close added in v1.5.4

func (mr *MockThrottlerMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockThrottlerMockRecorder) Throttle added in v1.5.4

func (mr *MockThrottlerMockRecorder) Throttle(arg0 any) *gomock.Call

Throttle indicates an expected call of Throttle.

type MockTupleBackend

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

MockTupleBackend is a mock of TupleBackend interface.

func NewMockTupleBackend

func NewMockTupleBackend(ctrl *gomock.Controller) *MockTupleBackend

NewMockTupleBackend creates a new mock instance.

func (*MockTupleBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTupleBackend) MaxTuplesPerWrite

func (m *MockTupleBackend) MaxTuplesPerWrite() int

MaxTuplesPerWrite mocks base method.

func (*MockTupleBackend) Read

Read mocks base method.

func (*MockTupleBackend) ReadPage

func (m *MockTupleBackend) ReadPage(ctx context.Context, store string, tupleKey *openfgav1.TupleKey, paginationOptions storage.PaginationOptions) ([]*openfgav1.Tuple, []byte, error)

ReadPage mocks base method.

func (*MockTupleBackend) ReadStartingWithUser

func (m *MockTupleBackend) ReadStartingWithUser(ctx context.Context, store string, filter storage.ReadStartingWithUserFilter) (storage.TupleIterator, error)

ReadStartingWithUser mocks base method.

func (*MockTupleBackend) ReadUserTuple

func (m *MockTupleBackend) ReadUserTuple(ctx context.Context, store string, tupleKey *openfgav1.TupleKey) (*openfgav1.Tuple, error)

ReadUserTuple mocks base method.

func (*MockTupleBackend) ReadUsersetTuples

func (m *MockTupleBackend) ReadUsersetTuples(ctx context.Context, store string, filter storage.ReadUsersetTuplesFilter) (storage.TupleIterator, error)

ReadUsersetTuples mocks base method.

func (*MockTupleBackend) Write

Write mocks base method.

type MockTupleBackendMockRecorder

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

MockTupleBackendMockRecorder is the mock recorder for MockTupleBackend.

func (*MockTupleBackendMockRecorder) MaxTuplesPerWrite

func (mr *MockTupleBackendMockRecorder) MaxTuplesPerWrite() *gomock.Call

MaxTuplesPerWrite indicates an expected call of MaxTuplesPerWrite.

func (*MockTupleBackendMockRecorder) Read

func (mr *MockTupleBackendMockRecorder) Read(ctx, store, tupleKey any) *gomock.Call

Read indicates an expected call of Read.

func (*MockTupleBackendMockRecorder) ReadPage

func (mr *MockTupleBackendMockRecorder) ReadPage(ctx, store, tupleKey, paginationOptions any) *gomock.Call

ReadPage indicates an expected call of ReadPage.

func (*MockTupleBackendMockRecorder) ReadStartingWithUser

func (mr *MockTupleBackendMockRecorder) ReadStartingWithUser(ctx, store, filter any) *gomock.Call

ReadStartingWithUser indicates an expected call of ReadStartingWithUser.

func (*MockTupleBackendMockRecorder) ReadUserTuple

func (mr *MockTupleBackendMockRecorder) ReadUserTuple(ctx, store, tupleKey any) *gomock.Call

ReadUserTuple indicates an expected call of ReadUserTuple.

func (*MockTupleBackendMockRecorder) ReadUsersetTuples

func (mr *MockTupleBackendMockRecorder) ReadUsersetTuples(ctx, store, filter any) *gomock.Call

ReadUsersetTuples indicates an expected call of ReadUsersetTuples.

func (*MockTupleBackendMockRecorder) Write

func (mr *MockTupleBackendMockRecorder) Write(ctx, store, d, w any) *gomock.Call

Write indicates an expected call of Write.

type MockTypeDefinitionWriteBackend

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

MockTypeDefinitionWriteBackend is a mock of TypeDefinitionWriteBackend interface.

func NewMockTypeDefinitionWriteBackend

func NewMockTypeDefinitionWriteBackend(ctrl *gomock.Controller) *MockTypeDefinitionWriteBackend

NewMockTypeDefinitionWriteBackend creates a new mock instance.

func (*MockTypeDefinitionWriteBackend) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTypeDefinitionWriteBackend) MaxTypesPerAuthorizationModel

func (m *MockTypeDefinitionWriteBackend) MaxTypesPerAuthorizationModel() int

MaxTypesPerAuthorizationModel mocks base method.

func (*MockTypeDefinitionWriteBackend) WriteAuthorizationModel

func (m *MockTypeDefinitionWriteBackend) WriteAuthorizationModel(ctx context.Context, store string, model *openfgav1.AuthorizationModel) error

WriteAuthorizationModel mocks base method.

type MockTypeDefinitionWriteBackendMockRecorder

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

MockTypeDefinitionWriteBackendMockRecorder is the mock recorder for MockTypeDefinitionWriteBackend.

func (*MockTypeDefinitionWriteBackendMockRecorder) MaxTypesPerAuthorizationModel

func (mr *MockTypeDefinitionWriteBackendMockRecorder) MaxTypesPerAuthorizationModel() *gomock.Call

MaxTypesPerAuthorizationModel indicates an expected call of MaxTypesPerAuthorizationModel.

func (*MockTypeDefinitionWriteBackendMockRecorder) WriteAuthorizationModel

func (mr *MockTypeDefinitionWriteBackendMockRecorder) WriteAuthorizationModel(ctx, store, model any) *gomock.Call

WriteAuthorizationModel indicates an expected call of WriteAuthorizationModel.

Jump to

Keyboard shortcuts

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