github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/runtime/automock/label_repository.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	model "github.com/kyma-incubator/compass/components/director/internal/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // LabelRepository is an autogenerated mock type for the labelRepository type
    13  type LabelRepository struct {
    14  	mock.Mock
    15  }
    16  
    17  // Delete provides a mock function with given fields: ctx, tenant, objectType, objectID, key
    18  func (_m *LabelRepository) Delete(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) error {
    19  	ret := _m.Called(ctx, tenant, objectType, objectID, key)
    20  
    21  	var r0 error
    22  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    23  		r0 = rf(ctx, tenant, objectType, objectID, key)
    24  	} else {
    25  		r0 = ret.Error(0)
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // DeleteAll provides a mock function with given fields: ctx, tenant, objectType, objectID
    32  func (_m *LabelRepository) DeleteAll(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) error {
    33  	ret := _m.Called(ctx, tenant, objectType, objectID)
    34  
    35  	var r0 error
    36  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string) error); ok {
    37  		r0 = rf(ctx, tenant, objectType, objectID)
    38  	} else {
    39  		r0 = ret.Error(0)
    40  	}
    41  
    42  	return r0
    43  }
    44  
    45  // DeleteByKeyNegationPattern provides a mock function with given fields: ctx, tenant, objectType, objectID, labelKeyPattern
    46  func (_m *LabelRepository) DeleteByKeyNegationPattern(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, labelKeyPattern string) error {
    47  	ret := _m.Called(ctx, tenant, objectType, objectID, labelKeyPattern)
    48  
    49  	var r0 error
    50  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    51  		r0 = rf(ctx, tenant, objectType, objectID, labelKeyPattern)
    52  	} else {
    53  		r0 = ret.Error(0)
    54  	}
    55  
    56  	return r0
    57  }
    58  
    59  // GetByKey provides a mock function with given fields: ctx, tenant, objectType, objectID, key
    60  func (_m *LabelRepository) GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) (*model.Label, error) {
    61  	ret := _m.Called(ctx, tenant, objectType, objectID, key)
    62  
    63  	var r0 *model.Label
    64  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) *model.Label); ok {
    65  		r0 = rf(ctx, tenant, objectType, objectID, key)
    66  	} else {
    67  		if ret.Get(0) != nil {
    68  			r0 = ret.Get(0).(*model.Label)
    69  		}
    70  	}
    71  
    72  	var r1 error
    73  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    74  		r1 = rf(ctx, tenant, objectType, objectID, key)
    75  	} else {
    76  		r1 = ret.Error(1)
    77  	}
    78  
    79  	return r0, r1
    80  }
    81  
    82  // ListForObject provides a mock function with given fields: ctx, tenant, objectType, objectID
    83  func (_m *LabelRepository) ListForObject(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) (map[string]*model.Label, error) {
    84  	ret := _m.Called(ctx, tenant, objectType, objectID)
    85  
    86  	var r0 map[string]*model.Label
    87  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string) map[string]*model.Label); ok {
    88  		r0 = rf(ctx, tenant, objectType, objectID)
    89  	} else {
    90  		if ret.Get(0) != nil {
    91  			r0 = ret.Get(0).(map[string]*model.Label)
    92  		}
    93  	}
    94  
    95  	var r1 error
    96  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string) error); ok {
    97  		r1 = rf(ctx, tenant, objectType, objectID)
    98  	} else {
    99  		r1 = ret.Error(1)
   100  	}
   101  
   102  	return r0, r1
   103  }
   104  
   105  type mockConstructorTestingTNewLabelRepository interface {
   106  	mock.TestingT
   107  	Cleanup(func())
   108  }
   109  
   110  // NewLabelRepository creates a new instance of LabelRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   111  func NewLabelRepository(t mockConstructorTestingTNewLabelRepository) *LabelRepository {
   112  	mock := &LabelRepository{}
   113  	mock.Mock.Test(t)
   114  
   115  	t.Cleanup(func() { mock.AssertExpectations(t) })
   116  
   117  	return mock
   118  }