mocks

package
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) Create

func (_m *MockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

Create provides a mock function with given fields: ctx, obj, opts

func (*MockClient) Delete

func (_m *MockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

Delete provides a mock function with given fields: ctx, obj, opts

func (*MockClient) DeleteAllOf

func (_m *MockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

DeleteAllOf provides a mock function with given fields: ctx, obj, opts

func (*MockClient) Get

func (_m *MockClient) Get(ctx context.Context, key types.NamespacedName, obj client.Object, opts ...client.GetOption) error

Get provides a mock function with given fields: ctx, key, obj, opts

func (*MockClient) GroupVersionKindFor

func (_m *MockClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)

GroupVersionKindFor provides a mock function with given fields: obj

func (*MockClient) IsObjectNamespaced

func (_m *MockClient) IsObjectNamespaced(obj runtime.Object) (bool, error)

IsObjectNamespaced provides a mock function with given fields: obj

func (*MockClient) List

func (_m *MockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

List provides a mock function with given fields: ctx, list, opts

func (*MockClient) Patch

func (_m *MockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

Patch provides a mock function with given fields: ctx, obj, patch, opts

func (*MockClient) RESTMapper

func (_m *MockClient) RESTMapper() meta.RESTMapper

RESTMapper provides a mock function with no fields

func (*MockClient) Scheme

func (_m *MockClient) Scheme() *runtime.Scheme

Scheme provides a mock function with no fields

func (*MockClient) Status

func (_m *MockClient) Status() client.SubResourceWriter

Status provides a mock function with no fields

func (*MockClient) SubResource

func (_m *MockClient) SubResource(subResource string) client.SubResourceClient

SubResource provides a mock function with given fields: subResource

func (*MockClient) Update

func (_m *MockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

Update provides a mock function with given fields: ctx, obj, opts

type MockReconciler

type MockReconciler struct {
	mock.Mock
}

MockReconciler is an autogenerated mock type for the Reconciler type

func NewMockReconciler

func NewMockReconciler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReconciler

NewMockReconciler creates a new instance of MockReconciler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockReconciler) EnsureCreated

EnsureCreated provides a mock function with given fields: _a0, _a1

func (*MockReconciler) EnsureDeleted

EnsureDeleted provides a mock function with given fields: _a0, _a1

type MockStorage

type MockStorage struct {
	mock.Mock
}

MockStorage is an autogenerated mock type for the Storage type

func NewMockStorage

func NewMockStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStorage

NewMockStorage creates a new instance of MockStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockStorage) Close

func (_m *MockStorage) Close() error

Close provides a mock function with no fields

func (*MockStorage) CreateAuthCode

func (_m *MockStorage) CreateAuthCode(ctx context.Context, c storage.AuthCode) error

CreateAuthCode provides a mock function with given fields: ctx, c

func (*MockStorage) CreateAuthRequest

func (_m *MockStorage) CreateAuthRequest(ctx context.Context, a storage.AuthRequest) error

CreateAuthRequest provides a mock function with given fields: ctx, a

func (*MockStorage) CreateClient

func (_m *MockStorage) CreateClient(ctx context.Context, c storage.Client) error

CreateClient provides a mock function with given fields: ctx, c

func (*MockStorage) CreateConnector

func (_m *MockStorage) CreateConnector(ctx context.Context, c storage.Connector) error

CreateConnector provides a mock function with given fields: ctx, c

func (*MockStorage) CreateDeviceRequest

func (_m *MockStorage) CreateDeviceRequest(ctx context.Context, d storage.DeviceRequest) error

CreateDeviceRequest provides a mock function with given fields: ctx, d

func (*MockStorage) CreateDeviceToken

func (_m *MockStorage) CreateDeviceToken(ctx context.Context, d storage.DeviceToken) error

CreateDeviceToken provides a mock function with given fields: ctx, d

func (*MockStorage) CreateOfflineSessions

func (_m *MockStorage) CreateOfflineSessions(ctx context.Context, s storage.OfflineSessions) error

CreateOfflineSessions provides a mock function with given fields: ctx, s

func (*MockStorage) CreatePassword

func (_m *MockStorage) CreatePassword(ctx context.Context, p storage.Password) error

CreatePassword provides a mock function with given fields: ctx, p

func (*MockStorage) CreateRefresh

func (_m *MockStorage) CreateRefresh(ctx context.Context, r storage.RefreshToken) error

CreateRefresh provides a mock function with given fields: ctx, r

func (*MockStorage) DeleteAuthCode

func (_m *MockStorage) DeleteAuthCode(code string) error

DeleteAuthCode provides a mock function with given fields: code

func (*MockStorage) DeleteAuthRequest

func (_m *MockStorage) DeleteAuthRequest(id string) error

DeleteAuthRequest provides a mock function with given fields: id

func (*MockStorage) DeleteClient

func (_m *MockStorage) DeleteClient(id string) error

DeleteClient provides a mock function with given fields: id

func (*MockStorage) DeleteConnector

func (_m *MockStorage) DeleteConnector(id string) error

DeleteConnector provides a mock function with given fields: id

func (*MockStorage) DeleteOfflineSessions

func (_m *MockStorage) DeleteOfflineSessions(userID string, connID string) error

DeleteOfflineSessions provides a mock function with given fields: userID, connID

func (*MockStorage) DeletePassword

func (_m *MockStorage) DeletePassword(email string) error

DeletePassword provides a mock function with given fields: email

func (*MockStorage) DeleteRefresh

func (_m *MockStorage) DeleteRefresh(id string) error

DeleteRefresh provides a mock function with given fields: id

func (*MockStorage) GarbageCollect

func (_m *MockStorage) GarbageCollect(now time.Time) (storage.GCResult, error)

GarbageCollect provides a mock function with given fields: now

func (*MockStorage) GetAuthCode

func (_m *MockStorage) GetAuthCode(id string) (storage.AuthCode, error)

GetAuthCode provides a mock function with given fields: id

func (*MockStorage) GetAuthRequest

func (_m *MockStorage) GetAuthRequest(id string) (storage.AuthRequest, error)

GetAuthRequest provides a mock function with given fields: id

func (*MockStorage) GetClient

func (_m *MockStorage) GetClient(id string) (storage.Client, error)

GetClient provides a mock function with given fields: id

func (*MockStorage) GetConnector

func (_m *MockStorage) GetConnector(id string) (storage.Connector, error)

GetConnector provides a mock function with given fields: id

func (*MockStorage) GetDeviceRequest

func (_m *MockStorage) GetDeviceRequest(userCode string) (storage.DeviceRequest, error)

GetDeviceRequest provides a mock function with given fields: userCode

func (*MockStorage) GetDeviceToken

func (_m *MockStorage) GetDeviceToken(deviceCode string) (storage.DeviceToken, error)

GetDeviceToken provides a mock function with given fields: deviceCode

func (*MockStorage) GetKeys

func (_m *MockStorage) GetKeys() (storage.Keys, error)

GetKeys provides a mock function with no fields

func (*MockStorage) GetOfflineSessions

func (_m *MockStorage) GetOfflineSessions(userID string, connID string) (storage.OfflineSessions, error)

GetOfflineSessions provides a mock function with given fields: userID, connID

func (*MockStorage) GetPassword

func (_m *MockStorage) GetPassword(email string) (storage.Password, error)

GetPassword provides a mock function with given fields: email

func (*MockStorage) GetRefresh

func (_m *MockStorage) GetRefresh(id string) (storage.RefreshToken, error)

GetRefresh provides a mock function with given fields: id

func (*MockStorage) ListClients

func (_m *MockStorage) ListClients() ([]storage.Client, error)

ListClients provides a mock function with no fields

func (*MockStorage) ListConnectors

func (_m *MockStorage) ListConnectors() ([]storage.Connector, error)

ListConnectors provides a mock function with no fields

func (*MockStorage) ListPasswords

func (_m *MockStorage) ListPasswords() ([]storage.Password, error)

ListPasswords provides a mock function with no fields

func (*MockStorage) ListRefreshTokens

func (_m *MockStorage) ListRefreshTokens() ([]storage.RefreshToken, error)

ListRefreshTokens provides a mock function with no fields

func (*MockStorage) UpdateAuthRequest

func (_m *MockStorage) UpdateAuthRequest(id string, updater func(storage.AuthRequest) (storage.AuthRequest, error)) error

UpdateAuthRequest provides a mock function with given fields: id, updater

func (*MockStorage) UpdateClient

func (_m *MockStorage) UpdateClient(id string, updater func(storage.Client) (storage.Client, error)) error

UpdateClient provides a mock function with given fields: id, updater

func (*MockStorage) UpdateConnector

func (_m *MockStorage) UpdateConnector(id string, updater func(storage.Connector) (storage.Connector, error)) error

UpdateConnector provides a mock function with given fields: id, updater

func (*MockStorage) UpdateDeviceToken

func (_m *MockStorage) UpdateDeviceToken(deviceCode string, updater func(storage.DeviceToken) (storage.DeviceToken, error)) error

UpdateDeviceToken provides a mock function with given fields: deviceCode, updater

func (*MockStorage) UpdateKeys

func (_m *MockStorage) UpdateKeys(updater func(storage.Keys) (storage.Keys, error)) error

UpdateKeys provides a mock function with given fields: updater

func (*MockStorage) UpdateOfflineSessions

func (_m *MockStorage) UpdateOfflineSessions(userID string, connID string, updater func(storage.OfflineSessions) (storage.OfflineSessions, error)) error

UpdateOfflineSessions provides a mock function with given fields: userID, connID, updater

func (*MockStorage) UpdatePassword

func (_m *MockStorage) UpdatePassword(email string, updater func(storage.Password) (storage.Password, error)) error

UpdatePassword provides a mock function with given fields: email, updater

func (*MockStorage) UpdateRefreshToken

func (_m *MockStorage) UpdateRefreshToken(id string, updater func(storage.RefreshToken) (storage.RefreshToken, error)) error

UpdateRefreshToken provides a mock function with given fields: id, updater

type MockSubResourceWriter

type MockSubResourceWriter struct {
	mock.Mock
}

MockSubResourceWriter is an autogenerated mock type for the SubResourceWriter type

func NewMockSubResourceWriter

func NewMockSubResourceWriter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSubResourceWriter

NewMockSubResourceWriter creates a new instance of MockSubResourceWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockSubResourceWriter) Create

Create provides a mock function with given fields: ctx, obj, subResource, opts

func (*MockSubResourceWriter) Patch

Patch provides a mock function with given fields: ctx, obj, patch, opts

func (*MockSubResourceWriter) Update

Update provides a mock function with given fields: ctx, obj, opts

Jump to

Keyboard shortcuts

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