Documentation
¶
Index ¶
- type MockService
- func (_m *MockService) CreateWorkload(ctx context.Context, namespaceName string, w *v1alpha1.Workload) (*v1alpha1.Workload, error)
- func (_m *MockService) DeleteWorkload(ctx context.Context, namespaceName string, workloadName string) error
- func (_m *MockService) EXPECT() *MockService_Expecter
- func (_m *MockService) GetWorkload(ctx context.Context, namespaceName string, workloadName string) (*v1alpha1.Workload, error)
- func (_m *MockService) GetWorkloadSchema(ctx context.Context) (*v1.JSONSchemaProps, error)
- func (_m *MockService) ListWorkloads(ctx context.Context, namespaceName string, componentName string, ...) (*services.ListResult[v1alpha1.Workload], error)
- func (_m *MockService) UpdateWorkload(ctx context.Context, namespaceName string, w *v1alpha1.Workload) (*v1alpha1.Workload, error)
- type MockService_CreateWorkload_Call
- func (_c *MockService_CreateWorkload_Call) Return(_a0 *v1alpha1.Workload, _a1 error) *MockService_CreateWorkload_Call
- func (_c *MockService_CreateWorkload_Call) Run(run func(ctx context.Context, namespaceName string, w *v1alpha1.Workload)) *MockService_CreateWorkload_Call
- func (_c *MockService_CreateWorkload_Call) RunAndReturn(...) *MockService_CreateWorkload_Call
- type MockService_DeleteWorkload_Call
- func (_c *MockService_DeleteWorkload_Call) Return(_a0 error) *MockService_DeleteWorkload_Call
- func (_c *MockService_DeleteWorkload_Call) Run(run func(ctx context.Context, namespaceName string, workloadName string)) *MockService_DeleteWorkload_Call
- func (_c *MockService_DeleteWorkload_Call) RunAndReturn(run func(context.Context, string, string) error) *MockService_DeleteWorkload_Call
- type MockService_Expecter
- func (_e *MockService_Expecter) CreateWorkload(ctx interface{}, namespaceName interface{}, w interface{}) *MockService_CreateWorkload_Call
- func (_e *MockService_Expecter) DeleteWorkload(ctx interface{}, namespaceName interface{}, workloadName interface{}) *MockService_DeleteWorkload_Call
- func (_e *MockService_Expecter) GetWorkload(ctx interface{}, namespaceName interface{}, workloadName interface{}) *MockService_GetWorkload_Call
- func (_e *MockService_Expecter) GetWorkloadSchema(ctx interface{}) *MockService_GetWorkloadSchema_Call
- func (_e *MockService_Expecter) ListWorkloads(ctx interface{}, namespaceName interface{}, componentName interface{}, ...) *MockService_ListWorkloads_Call
- func (_e *MockService_Expecter) UpdateWorkload(ctx interface{}, namespaceName interface{}, w interface{}) *MockService_UpdateWorkload_Call
- type MockService_GetWorkloadSchema_Call
- func (_c *MockService_GetWorkloadSchema_Call) Return(_a0 *v1.JSONSchemaProps, _a1 error) *MockService_GetWorkloadSchema_Call
- func (_c *MockService_GetWorkloadSchema_Call) Run(run func(ctx context.Context)) *MockService_GetWorkloadSchema_Call
- func (_c *MockService_GetWorkloadSchema_Call) RunAndReturn(run func(context.Context) (*v1.JSONSchemaProps, error)) *MockService_GetWorkloadSchema_Call
- type MockService_GetWorkload_Call
- func (_c *MockService_GetWorkload_Call) Return(_a0 *v1alpha1.Workload, _a1 error) *MockService_GetWorkload_Call
- func (_c *MockService_GetWorkload_Call) Run(run func(ctx context.Context, namespaceName string, workloadName string)) *MockService_GetWorkload_Call
- func (_c *MockService_GetWorkload_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Workload, error)) *MockService_GetWorkload_Call
- type MockService_ListWorkloads_Call
- func (_c *MockService_ListWorkloads_Call) Return(_a0 *services.ListResult[v1alpha1.Workload], _a1 error) *MockService_ListWorkloads_Call
- func (_c *MockService_ListWorkloads_Call) Run(run func(ctx context.Context, namespaceName string, componentName string, ...)) *MockService_ListWorkloads_Call
- func (_c *MockService_ListWorkloads_Call) RunAndReturn(...) *MockService_ListWorkloads_Call
- type MockService_UpdateWorkload_Call
- func (_c *MockService_UpdateWorkload_Call) Return(_a0 *v1alpha1.Workload, _a1 error) *MockService_UpdateWorkload_Call
- func (_c *MockService_UpdateWorkload_Call) Run(run func(ctx context.Context, namespaceName string, w *v1alpha1.Workload)) *MockService_UpdateWorkload_Call
- func (_c *MockService_UpdateWorkload_Call) RunAndReturn(...) *MockService_UpdateWorkload_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface {
mock.TestingT
Cleanup(func())
}) *MockService
NewMockService creates a new instance of MockService. 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 (*MockService) CreateWorkload ¶
func (_m *MockService) CreateWorkload(ctx context.Context, namespaceName string, w *v1alpha1.Workload) (*v1alpha1.Workload, error)
CreateWorkload provides a mock function with given fields: ctx, namespaceName, w
func (*MockService) DeleteWorkload ¶
func (_m *MockService) DeleteWorkload(ctx context.Context, namespaceName string, workloadName string) error
DeleteWorkload provides a mock function with given fields: ctx, namespaceName, workloadName
func (*MockService) EXPECT ¶
func (_m *MockService) EXPECT() *MockService_Expecter
func (*MockService) GetWorkload ¶
func (_m *MockService) GetWorkload(ctx context.Context, namespaceName string, workloadName string) (*v1alpha1.Workload, error)
GetWorkload provides a mock function with given fields: ctx, namespaceName, workloadName
func (*MockService) GetWorkloadSchema ¶
func (_m *MockService) GetWorkloadSchema(ctx context.Context) (*v1.JSONSchemaProps, error)
GetWorkloadSchema provides a mock function with given fields: ctx
func (*MockService) ListWorkloads ¶
func (_m *MockService) ListWorkloads(ctx context.Context, namespaceName string, componentName string, opts services.ListOptions) (*services.ListResult[v1alpha1.Workload], error)
ListWorkloads provides a mock function with given fields: ctx, namespaceName, componentName, opts
type MockService_CreateWorkload_Call ¶
MockService_CreateWorkload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWorkload'
func (*MockService_CreateWorkload_Call) Return ¶
func (_c *MockService_CreateWorkload_Call) Return(_a0 *v1alpha1.Workload, _a1 error) *MockService_CreateWorkload_Call
func (*MockService_CreateWorkload_Call) Run ¶
func (_c *MockService_CreateWorkload_Call) Run(run func(ctx context.Context, namespaceName string, w *v1alpha1.Workload)) *MockService_CreateWorkload_Call
func (*MockService_CreateWorkload_Call) RunAndReturn ¶
func (_c *MockService_CreateWorkload_Call) RunAndReturn(run func(context.Context, string, *v1alpha1.Workload) (*v1alpha1.Workload, error)) *MockService_CreateWorkload_Call
type MockService_DeleteWorkload_Call ¶
MockService_DeleteWorkload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWorkload'
func (*MockService_DeleteWorkload_Call) Return ¶
func (_c *MockService_DeleteWorkload_Call) Return(_a0 error) *MockService_DeleteWorkload_Call
func (*MockService_DeleteWorkload_Call) Run ¶
func (_c *MockService_DeleteWorkload_Call) Run(run func(ctx context.Context, namespaceName string, workloadName string)) *MockService_DeleteWorkload_Call
func (*MockService_DeleteWorkload_Call) RunAndReturn ¶
func (_c *MockService_DeleteWorkload_Call) RunAndReturn(run func(context.Context, string, string) error) *MockService_DeleteWorkload_Call
type MockService_Expecter ¶
type MockService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockService_Expecter) CreateWorkload ¶
func (_e *MockService_Expecter) CreateWorkload(ctx interface{}, namespaceName interface{}, w interface{}) *MockService_CreateWorkload_Call
CreateWorkload is a helper method to define mock.On call
- ctx context.Context
- namespaceName string
- w *v1alpha1.Workload
func (*MockService_Expecter) DeleteWorkload ¶
func (_e *MockService_Expecter) DeleteWorkload(ctx interface{}, namespaceName interface{}, workloadName interface{}) *MockService_DeleteWorkload_Call
DeleteWorkload is a helper method to define mock.On call
- ctx context.Context
- namespaceName string
- workloadName string
func (*MockService_Expecter) GetWorkload ¶
func (_e *MockService_Expecter) GetWorkload(ctx interface{}, namespaceName interface{}, workloadName interface{}) *MockService_GetWorkload_Call
GetWorkload is a helper method to define mock.On call
- ctx context.Context
- namespaceName string
- workloadName string
func (*MockService_Expecter) GetWorkloadSchema ¶
func (_e *MockService_Expecter) GetWorkloadSchema(ctx interface{}) *MockService_GetWorkloadSchema_Call
GetWorkloadSchema is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) ListWorkloads ¶
func (_e *MockService_Expecter) ListWorkloads(ctx interface{}, namespaceName interface{}, componentName interface{}, opts interface{}) *MockService_ListWorkloads_Call
ListWorkloads is a helper method to define mock.On call
- ctx context.Context
- namespaceName string
- componentName string
- opts services.ListOptions
func (*MockService_Expecter) UpdateWorkload ¶
func (_e *MockService_Expecter) UpdateWorkload(ctx interface{}, namespaceName interface{}, w interface{}) *MockService_UpdateWorkload_Call
UpdateWorkload is a helper method to define mock.On call
- ctx context.Context
- namespaceName string
- w *v1alpha1.Workload
type MockService_GetWorkloadSchema_Call ¶
MockService_GetWorkloadSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkloadSchema'
func (*MockService_GetWorkloadSchema_Call) Return ¶
func (_c *MockService_GetWorkloadSchema_Call) Return(_a0 *v1.JSONSchemaProps, _a1 error) *MockService_GetWorkloadSchema_Call
func (*MockService_GetWorkloadSchema_Call) Run ¶
func (_c *MockService_GetWorkloadSchema_Call) Run(run func(ctx context.Context)) *MockService_GetWorkloadSchema_Call
func (*MockService_GetWorkloadSchema_Call) RunAndReturn ¶
func (_c *MockService_GetWorkloadSchema_Call) RunAndReturn(run func(context.Context) (*v1.JSONSchemaProps, error)) *MockService_GetWorkloadSchema_Call
type MockService_GetWorkload_Call ¶
MockService_GetWorkload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkload'
func (*MockService_GetWorkload_Call) Return ¶
func (_c *MockService_GetWorkload_Call) Return(_a0 *v1alpha1.Workload, _a1 error) *MockService_GetWorkload_Call
func (*MockService_GetWorkload_Call) Run ¶
func (_c *MockService_GetWorkload_Call) Run(run func(ctx context.Context, namespaceName string, workloadName string)) *MockService_GetWorkload_Call
func (*MockService_GetWorkload_Call) RunAndReturn ¶
func (_c *MockService_GetWorkload_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Workload, error)) *MockService_GetWorkload_Call
type MockService_ListWorkloads_Call ¶
MockService_ListWorkloads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWorkloads'
func (*MockService_ListWorkloads_Call) Return ¶
func (_c *MockService_ListWorkloads_Call) Return(_a0 *services.ListResult[v1alpha1.Workload], _a1 error) *MockService_ListWorkloads_Call
func (*MockService_ListWorkloads_Call) Run ¶
func (_c *MockService_ListWorkloads_Call) Run(run func(ctx context.Context, namespaceName string, componentName string, opts services.ListOptions)) *MockService_ListWorkloads_Call
func (*MockService_ListWorkloads_Call) RunAndReturn ¶
func (_c *MockService_ListWorkloads_Call) RunAndReturn(run func(context.Context, string, string, services.ListOptions) (*services.ListResult[v1alpha1.Workload], error)) *MockService_ListWorkloads_Call
type MockService_UpdateWorkload_Call ¶
MockService_UpdateWorkload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWorkload'
func (*MockService_UpdateWorkload_Call) Return ¶
func (_c *MockService_UpdateWorkload_Call) Return(_a0 *v1alpha1.Workload, _a1 error) *MockService_UpdateWorkload_Call
func (*MockService_UpdateWorkload_Call) Run ¶
func (_c *MockService_UpdateWorkload_Call) Run(run func(ctx context.Context, namespaceName string, w *v1alpha1.Workload)) *MockService_UpdateWorkload_Call
func (*MockService_UpdateWorkload_Call) RunAndReturn ¶
func (_c *MockService_UpdateWorkload_Call) RunAndReturn(run func(context.Context, string, *v1alpha1.Workload) (*v1alpha1.Workload, error)) *MockService_UpdateWorkload_Call