Documentation
¶
Index ¶
- type MockObjectStore
- func (_m *MockObjectStore[T]) CreateOrReplace(ctx context.Context, obj T) error
- func (_m *MockObjectStore[T]) Delete(ctx context.Context, namespace string, name string) error
- func (_m *MockObjectStore[T]) EXPECT() *MockObjectStore_Expecter[T]
- func (_m *MockObjectStore[T]) Get(ctx context.Context, namespace string, name string) (T, error)
- func (_m *MockObjectStore[T]) Info() (schema.GroupVersionResource, schema.GroupVersionKind)
- func (_m *MockObjectStore[T]) List(ctx context.Context, opts store.ListOpts) (*store.ListResponse[T], error)
- func (_m *MockObjectStore[T]) Patch(ctx context.Context, namespace string, name string, ops ...store.Patch) (T, error)
- func (_m *MockObjectStore[T]) Ready() bool
- type MockObjectStore_CreateOrReplace_Call
- func (_c *MockObjectStore_CreateOrReplace_Call[T]) Return(_a0 error) *MockObjectStore_CreateOrReplace_Call[T]
- func (_c *MockObjectStore_CreateOrReplace_Call[T]) Run(run func(ctx context.Context, obj T)) *MockObjectStore_CreateOrReplace_Call[T]
- func (_c *MockObjectStore_CreateOrReplace_Call[T]) RunAndReturn(run func(context.Context, T) error) *MockObjectStore_CreateOrReplace_Call[T]
- type MockObjectStore_Delete_Call
- func (_c *MockObjectStore_Delete_Call[T]) Return(_a0 error) *MockObjectStore_Delete_Call[T]
- func (_c *MockObjectStore_Delete_Call[T]) Run(run func(ctx context.Context, namespace string, name string)) *MockObjectStore_Delete_Call[T]
- func (_c *MockObjectStore_Delete_Call[T]) RunAndReturn(run func(context.Context, string, string) error) *MockObjectStore_Delete_Call[T]
- type MockObjectStore_Expecter
- func (_e *MockObjectStore_Expecter[T]) CreateOrReplace(ctx interface{}, obj interface{}) *MockObjectStore_CreateOrReplace_Call[T]
- func (_e *MockObjectStore_Expecter[T]) Delete(ctx interface{}, namespace interface{}, name interface{}) *MockObjectStore_Delete_Call[T]
- func (_e *MockObjectStore_Expecter[T]) Get(ctx interface{}, namespace interface{}, name interface{}) *MockObjectStore_Get_Call[T]
- func (_e *MockObjectStore_Expecter[T]) Info() *MockObjectStore_Info_Call[T]
- func (_e *MockObjectStore_Expecter[T]) List(ctx interface{}, opts interface{}) *MockObjectStore_List_Call[T]
- func (_e *MockObjectStore_Expecter[T]) Patch(ctx interface{}, namespace interface{}, name interface{}, ops ...interface{}) *MockObjectStore_Patch_Call[T]
- func (_e *MockObjectStore_Expecter[T]) Ready() *MockObjectStore_Ready_Call[T]
- type MockObjectStore_Get_Call
- func (_c *MockObjectStore_Get_Call[T]) Return(_a0 T, _a1 error) *MockObjectStore_Get_Call[T]
- func (_c *MockObjectStore_Get_Call[T]) Run(run func(ctx context.Context, namespace string, name string)) *MockObjectStore_Get_Call[T]
- func (_c *MockObjectStore_Get_Call[T]) RunAndReturn(run func(context.Context, string, string) (T, error)) *MockObjectStore_Get_Call[T]
- type MockObjectStore_Info_Call
- func (_c *MockObjectStore_Info_Call[T]) Return(_a0 schema.GroupVersionResource, _a1 schema.GroupVersionKind) *MockObjectStore_Info_Call[T]
- func (_c *MockObjectStore_Info_Call[T]) Run(run func()) *MockObjectStore_Info_Call[T]
- func (_c *MockObjectStore_Info_Call[T]) RunAndReturn(run func() (schema.GroupVersionResource, schema.GroupVersionKind)) *MockObjectStore_Info_Call[T]
- type MockObjectStore_List_Call
- func (_c *MockObjectStore_List_Call[T]) Return(_a0 *store.ListResponse[T], _a1 error) *MockObjectStore_List_Call[T]
- func (_c *MockObjectStore_List_Call[T]) Run(run func(ctx context.Context, opts store.ListOpts)) *MockObjectStore_List_Call[T]
- func (_c *MockObjectStore_List_Call[T]) RunAndReturn(run func(context.Context, store.ListOpts) (*store.ListResponse[T], error)) *MockObjectStore_List_Call[T]
- type MockObjectStore_Patch_Call
- func (_c *MockObjectStore_Patch_Call[T]) Return(_a0 T, _a1 error) *MockObjectStore_Patch_Call[T]
- func (_c *MockObjectStore_Patch_Call[T]) Run(...) *MockObjectStore_Patch_Call[T]
- func (_c *MockObjectStore_Patch_Call[T]) RunAndReturn(run func(context.Context, string, string, ...store.Patch) (T, error)) *MockObjectStore_Patch_Call[T]
- type MockObjectStore_Ready_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockObjectStore ¶
MockObjectStore is an autogenerated mock type for the ObjectStore type
func NewMockObjectStore ¶
func NewMockObjectStore[T store.Object](t interface { mock.TestingT Cleanup(func()) }) *MockObjectStore[T]
NewMockObjectStore creates a new instance of MockObjectStore. 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 (*MockObjectStore[T]) CreateOrReplace ¶
func (_m *MockObjectStore[T]) CreateOrReplace(ctx context.Context, obj T) error
CreateOrReplace provides a mock function with given fields: ctx, obj
func (*MockObjectStore[T]) Delete ¶
Delete provides a mock function with given fields: ctx, namespace, name
func (*MockObjectStore[T]) EXPECT ¶
func (_m *MockObjectStore[T]) EXPECT() *MockObjectStore_Expecter[T]
func (*MockObjectStore[T]) Get ¶
Get provides a mock function with given fields: ctx, namespace, name
func (*MockObjectStore[T]) Info ¶
func (_m *MockObjectStore[T]) Info() (schema.GroupVersionResource, schema.GroupVersionKind)
Info provides a mock function with no fields
func (*MockObjectStore[T]) List ¶
func (_m *MockObjectStore[T]) List(ctx context.Context, opts store.ListOpts) (*store.ListResponse[T], error)
List provides a mock function with given fields: ctx, opts
func (*MockObjectStore[T]) Patch ¶
func (_m *MockObjectStore[T]) Patch(ctx context.Context, namespace string, name string, ops ...store.Patch) (T, error)
Patch provides a mock function with given fields: ctx, namespace, name, ops
func (*MockObjectStore[T]) Ready ¶
func (_m *MockObjectStore[T]) Ready() bool
Ready provides a mock function with no fields
type MockObjectStore_CreateOrReplace_Call ¶
MockObjectStore_CreateOrReplace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOrReplace'
func (*MockObjectStore_CreateOrReplace_Call[T]) Return ¶
func (_c *MockObjectStore_CreateOrReplace_Call[T]) Return(_a0 error) *MockObjectStore_CreateOrReplace_Call[T]
func (*MockObjectStore_CreateOrReplace_Call[T]) Run ¶
func (_c *MockObjectStore_CreateOrReplace_Call[T]) Run(run func(ctx context.Context, obj T)) *MockObjectStore_CreateOrReplace_Call[T]
func (*MockObjectStore_CreateOrReplace_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_CreateOrReplace_Call[T]) RunAndReturn(run func(context.Context, T) error) *MockObjectStore_CreateOrReplace_Call[T]
type MockObjectStore_Delete_Call ¶
MockObjectStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockObjectStore_Delete_Call[T]) Return ¶
func (_c *MockObjectStore_Delete_Call[T]) Return(_a0 error) *MockObjectStore_Delete_Call[T]
func (*MockObjectStore_Delete_Call[T]) Run ¶
func (_c *MockObjectStore_Delete_Call[T]) Run(run func(ctx context.Context, namespace string, name string)) *MockObjectStore_Delete_Call[T]
func (*MockObjectStore_Delete_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_Delete_Call[T]) RunAndReturn(run func(context.Context, string, string) error) *MockObjectStore_Delete_Call[T]
type MockObjectStore_Expecter ¶
func (*MockObjectStore_Expecter[T]) CreateOrReplace ¶
func (_e *MockObjectStore_Expecter[T]) CreateOrReplace(ctx interface{}, obj interface{}) *MockObjectStore_CreateOrReplace_Call[T]
CreateOrReplace is a helper method to define mock.On call
- ctx context.Context
- obj T
func (*MockObjectStore_Expecter[T]) Delete ¶
func (_e *MockObjectStore_Expecter[T]) Delete(ctx interface{}, namespace interface{}, name interface{}) *MockObjectStore_Delete_Call[T]
Delete is a helper method to define mock.On call
- ctx context.Context
- namespace string
- name string
func (*MockObjectStore_Expecter[T]) Get ¶
func (_e *MockObjectStore_Expecter[T]) Get(ctx interface{}, namespace interface{}, name interface{}) *MockObjectStore_Get_Call[T]
Get is a helper method to define mock.On call
- ctx context.Context
- namespace string
- name string
func (*MockObjectStore_Expecter[T]) Info ¶
func (_e *MockObjectStore_Expecter[T]) Info() *MockObjectStore_Info_Call[T]
Info is a helper method to define mock.On call
func (*MockObjectStore_Expecter[T]) List ¶
func (_e *MockObjectStore_Expecter[T]) List(ctx interface{}, opts interface{}) *MockObjectStore_List_Call[T]
List is a helper method to define mock.On call
- ctx context.Context
- opts store.ListOpts
func (*MockObjectStore_Expecter[T]) Patch ¶
func (_e *MockObjectStore_Expecter[T]) Patch(ctx interface{}, namespace interface{}, name interface{}, ops ...interface{}) *MockObjectStore_Patch_Call[T]
Patch is a helper method to define mock.On call
- ctx context.Context
- namespace string
- name string
- ops ...store.Patch
func (*MockObjectStore_Expecter[T]) Ready ¶
func (_e *MockObjectStore_Expecter[T]) Ready() *MockObjectStore_Ready_Call[T]
Ready is a helper method to define mock.On call
type MockObjectStore_Get_Call ¶
MockObjectStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*MockObjectStore_Get_Call[T]) Return ¶
func (_c *MockObjectStore_Get_Call[T]) Return(_a0 T, _a1 error) *MockObjectStore_Get_Call[T]
func (*MockObjectStore_Get_Call[T]) Run ¶
func (_c *MockObjectStore_Get_Call[T]) Run(run func(ctx context.Context, namespace string, name string)) *MockObjectStore_Get_Call[T]
func (*MockObjectStore_Get_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_Get_Call[T]) RunAndReturn(run func(context.Context, string, string) (T, error)) *MockObjectStore_Get_Call[T]
type MockObjectStore_Info_Call ¶
MockObjectStore_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'
func (*MockObjectStore_Info_Call[T]) Return ¶
func (_c *MockObjectStore_Info_Call[T]) Return(_a0 schema.GroupVersionResource, _a1 schema.GroupVersionKind) *MockObjectStore_Info_Call[T]
func (*MockObjectStore_Info_Call[T]) Run ¶
func (_c *MockObjectStore_Info_Call[T]) Run(run func()) *MockObjectStore_Info_Call[T]
func (*MockObjectStore_Info_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_Info_Call[T]) RunAndReturn(run func() (schema.GroupVersionResource, schema.GroupVersionKind)) *MockObjectStore_Info_Call[T]
type MockObjectStore_List_Call ¶
MockObjectStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*MockObjectStore_List_Call[T]) Return ¶
func (_c *MockObjectStore_List_Call[T]) Return(_a0 *store.ListResponse[T], _a1 error) *MockObjectStore_List_Call[T]
func (*MockObjectStore_List_Call[T]) Run ¶
func (_c *MockObjectStore_List_Call[T]) Run(run func(ctx context.Context, opts store.ListOpts)) *MockObjectStore_List_Call[T]
func (*MockObjectStore_List_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_List_Call[T]) RunAndReturn(run func(context.Context, store.ListOpts) (*store.ListResponse[T], error)) *MockObjectStore_List_Call[T]
type MockObjectStore_Patch_Call ¶
MockObjectStore_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch'
func (*MockObjectStore_Patch_Call[T]) Return ¶
func (_c *MockObjectStore_Patch_Call[T]) Return(_a0 T, _a1 error) *MockObjectStore_Patch_Call[T]
func (*MockObjectStore_Patch_Call[T]) Run ¶
func (_c *MockObjectStore_Patch_Call[T]) Run(run func(ctx context.Context, namespace string, name string, ops ...store.Patch)) *MockObjectStore_Patch_Call[T]
func (*MockObjectStore_Patch_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_Patch_Call[T]) RunAndReturn(run func(context.Context, string, string, ...store.Patch) (T, error)) *MockObjectStore_Patch_Call[T]
type MockObjectStore_Ready_Call ¶
MockObjectStore_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready'
func (*MockObjectStore_Ready_Call[T]) Return ¶
func (_c *MockObjectStore_Ready_Call[T]) Return(_a0 bool) *MockObjectStore_Ready_Call[T]
func (*MockObjectStore_Ready_Call[T]) Run ¶
func (_c *MockObjectStore_Ready_Call[T]) Run(run func()) *MockObjectStore_Ready_Call[T]
func (*MockObjectStore_Ready_Call[T]) RunAndReturn ¶
func (_c *MockObjectStore_Ready_Call[T]) RunAndReturn(run func() bool) *MockObjectStore_Ready_Call[T]