mocks

package
v0.12.19-alpha.22 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelingService

type LabelingService struct {
	mock.Mock
}

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 (*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

type LabelingService_ApplyLabels_Call struct {
	*mock.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 (*LabelingService_ApplyLabels_Call) Run

func (*LabelingService_ApplyLabels_Call) RunAndReturn

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

type LabelingService_MergeLabels_Call struct {
	*mock.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 (*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

type LabelingService_ValidateUserLabels_Call

type LabelingService_ValidateUserLabels_Call struct {
	*mock.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 (*LabelingService_ValidateUserLabels_Call) Run

func (*LabelingService_ValidateUserLabels_Call) RunAndReturn

Jump to

Keyboard shortcuts

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