Documentation
¶
Index ¶
- type LabelingService
- func (_m *LabelingService) ApplyLabels(ctx context.Context, appeal *domain.Appeal, resource *domain.Resource, ...) (map[string]*domain.LabelMetadata, error)
- func (_m *LabelingService) EXPECT() *LabelingService_Expecter
- func (_m *LabelingService) MergeLabels(policyLabels map[string]*domain.LabelMetadata, ...) map[string]*domain.LabelMetadata
- func (_m *LabelingService) ValidateUserLabels(ctx context.Context, labels map[string]string, config *domain.UserLabelConfig) error
- type LabelingService_ApplyLabels_Call
- func (_c *LabelingService_ApplyLabels_Call) Return(_a0 map[string]*domain.LabelMetadata, _a1 error) *LabelingService_ApplyLabels_Call
- func (_c *LabelingService_ApplyLabels_Call) Run(...) *LabelingService_ApplyLabels_Call
- func (_c *LabelingService_ApplyLabels_Call) RunAndReturn(...) *LabelingService_ApplyLabels_Call
- type LabelingService_Expecter
- func (_e *LabelingService_Expecter) ApplyLabels(ctx interface{}, appeal interface{}, resource interface{}, policy interface{}) *LabelingService_ApplyLabels_Call
- func (_e *LabelingService_Expecter) MergeLabels(policyLabels interface{}, manualLabels interface{}, allowOverride interface{}) *LabelingService_MergeLabels_Call
- func (_e *LabelingService_Expecter) ValidateUserLabels(ctx interface{}, labels interface{}, config interface{}) *LabelingService_ValidateUserLabels_Call
- type LabelingService_MergeLabels_Call
- func (_c *LabelingService_MergeLabels_Call) Return(_a0 map[string]*domain.LabelMetadata) *LabelingService_MergeLabels_Call
- func (_c *LabelingService_MergeLabels_Call) Run(run func(policyLabels map[string]*domain.LabelMetadata, ...)) *LabelingService_MergeLabels_Call
- func (_c *LabelingService_MergeLabels_Call) RunAndReturn(...) *LabelingService_MergeLabels_Call
- type LabelingService_ValidateUserLabels_Call
- func (_c *LabelingService_ValidateUserLabels_Call) Return(_a0 error) *LabelingService_ValidateUserLabels_Call
- func (_c *LabelingService_ValidateUserLabels_Call) Run(...) *LabelingService_ValidateUserLabels_Call
- func (_c *LabelingService_ValidateUserLabels_Call) RunAndReturn(run func(context.Context, map[string]string, *domain.UserLabelConfig) error) *LabelingService_ValidateUserLabels_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabelingService ¶
LabelingService is a manual mock type for the labelingService interface
func NewLabelingService ¶
func NewLabelingService(t interface {
mock.TestingT
Cleanup(func())
}) *LabelingService
NewLabelingService creates a new instance of LabelingService. 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 (*LabelingService) ApplyLabels ¶
func (_m *LabelingService) ApplyLabels(ctx context.Context, appeal *domain.Appeal, resource *domain.Resource, policy *domain.Policy) (map[string]*domain.LabelMetadata, error)
ApplyLabels provides a mock function with given fields: ctx, appeal, resource, policy
func (*LabelingService) EXPECT ¶
func (_m *LabelingService) EXPECT() *LabelingService_Expecter
func (*LabelingService) MergeLabels ¶
func (_m *LabelingService) MergeLabels(policyLabels map[string]*domain.LabelMetadata, manualLabels map[string]*domain.LabelMetadata, allowOverride bool) map[string]*domain.LabelMetadata
MergeLabels provides a mock function with given fields: policyLabels, manualLabels, allowOverride
func (*LabelingService) ValidateUserLabels ¶
func (_m *LabelingService) ValidateUserLabels(ctx context.Context, labels map[string]string, config *domain.UserLabelConfig) error
ValidateUserLabels provides a mock function with given fields: ctx, labels, config
type LabelingService_ApplyLabels_Call ¶
LabelingService_ApplyLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyLabels'
func (*LabelingService_ApplyLabels_Call) Return ¶
func (_c *LabelingService_ApplyLabels_Call) Return(_a0 map[string]*domain.LabelMetadata, _a1 error) *LabelingService_ApplyLabels_Call
func (*LabelingService_ApplyLabels_Call) Run ¶
func (_c *LabelingService_ApplyLabels_Call) Run(run func(ctx context.Context, appeal *domain.Appeal, resource *domain.Resource, policy *domain.Policy)) *LabelingService_ApplyLabels_Call
func (*LabelingService_ApplyLabels_Call) RunAndReturn ¶
func (_c *LabelingService_ApplyLabels_Call) RunAndReturn(run func(context.Context, *domain.Appeal, *domain.Resource, *domain.Policy) (map[string]*domain.LabelMetadata, error)) *LabelingService_ApplyLabels_Call
type LabelingService_Expecter ¶
type LabelingService_Expecter struct {
// contains filtered or unexported fields
}
func (*LabelingService_Expecter) ApplyLabels ¶
func (_e *LabelingService_Expecter) ApplyLabels(ctx interface{}, appeal interface{}, resource interface{}, policy interface{}) *LabelingService_ApplyLabels_Call
ApplyLabels is a helper method to define mock.On call
- ctx context.Context
- appeal *domain.Appeal
- resource *domain.Resource
- policy *domain.Policy
func (*LabelingService_Expecter) MergeLabels ¶
func (_e *LabelingService_Expecter) MergeLabels(policyLabels interface{}, manualLabels interface{}, allowOverride interface{}) *LabelingService_MergeLabels_Call
MergeLabels is a helper method to define mock.On call
- policyLabels map[string]*domain.LabelMetadata
- manualLabels map[string]*domain.LabelMetadata
- allowOverride bool
func (*LabelingService_Expecter) ValidateUserLabels ¶
func (_e *LabelingService_Expecter) ValidateUserLabels(ctx interface{}, labels interface{}, config interface{}) *LabelingService_ValidateUserLabels_Call
ValidateUserLabels is a helper method to define mock.On call
- ctx context.Context
- labels map[string]string
- config *domain.UserLabelConfig
type LabelingService_MergeLabels_Call ¶
LabelingService_MergeLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MergeLabels'
func (*LabelingService_MergeLabels_Call) Return ¶
func (_c *LabelingService_MergeLabels_Call) Return(_a0 map[string]*domain.LabelMetadata) *LabelingService_MergeLabels_Call
func (*LabelingService_MergeLabels_Call) Run ¶
func (_c *LabelingService_MergeLabels_Call) Run(run func(policyLabels map[string]*domain.LabelMetadata, manualLabels map[string]*domain.LabelMetadata, allowOverride bool)) *LabelingService_MergeLabels_Call
func (*LabelingService_MergeLabels_Call) RunAndReturn ¶
func (_c *LabelingService_MergeLabels_Call) RunAndReturn(run func(map[string]*domain.LabelMetadata, map[string]*domain.LabelMetadata, bool) map[string]*domain.LabelMetadata) *LabelingService_MergeLabels_Call
type LabelingService_ValidateUserLabels_Call ¶
LabelingService_ValidateUserLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateUserLabels'
func (*LabelingService_ValidateUserLabels_Call) Return ¶
func (_c *LabelingService_ValidateUserLabels_Call) Return(_a0 error) *LabelingService_ValidateUserLabels_Call
func (*LabelingService_ValidateUserLabels_Call) Run ¶
func (_c *LabelingService_ValidateUserLabels_Call) Run(run func(ctx context.Context, labels map[string]string, config *domain.UserLabelConfig)) *LabelingService_ValidateUserLabels_Call
func (*LabelingService_ValidateUserLabels_Call) RunAndReturn ¶
func (_c *LabelingService_ValidateUserLabels_Call) RunAndReturn(run func(context.Context, map[string]string, *domain.UserLabelConfig) error) *LabelingService_ValidateUserLabels_Call