github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/labeldef/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  	mock "github.com/stretchr/testify/mock"
     9  
    10  	model "github.com/kyma-incubator/compass/components/director/internal/model"
    11  )
    12  
    13  // LabelRepository is an autogenerated mock type for the LabelRepository type
    14  type LabelRepository struct {
    15  	mock.Mock
    16  }
    17  
    18  // Delete provides a mock function with given fields: ctx, tenant, objectType, objectID, key
    19  func (_m *LabelRepository) Delete(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) error {
    20  	ret := _m.Called(ctx, tenant, objectType, objectID, key)
    21  
    22  	var r0 error
    23  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    24  		r0 = rf(ctx, tenant, objectType, objectID, key)
    25  	} else {
    26  		r0 = ret.Error(0)
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // DeleteAll provides a mock function with given fields: ctx, tenant, objectType, objectID
    33  func (_m *LabelRepository) DeleteAll(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) error {
    34  	ret := _m.Called(ctx, tenant, objectType, objectID)
    35  
    36  	var r0 error
    37  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string) error); ok {
    38  		r0 = rf(ctx, tenant, objectType, objectID)
    39  	} else {
    40  		r0 = ret.Error(0)
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // DeleteByKey provides a mock function with given fields: ctx, tenant, key
    47  func (_m *LabelRepository) DeleteByKey(ctx context.Context, tenant string, key string) error {
    48  	ret := _m.Called(ctx, tenant, key)
    49  
    50  	var r0 error
    51  	if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
    52  		r0 = rf(ctx, tenant, key)
    53  	} else {
    54  		r0 = ret.Error(0)
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  // GetByKey provides a mock function with given fields: ctx, tenant, objectType, objectID, key
    61  func (_m *LabelRepository) GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) (*model.Label, error) {
    62  	ret := _m.Called(ctx, tenant, objectType, objectID, key)
    63  
    64  	var r0 *model.Label
    65  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) *model.Label); ok {
    66  		r0 = rf(ctx, tenant, objectType, objectID, key)
    67  	} else {
    68  		if ret.Get(0) != nil {
    69  			r0 = ret.Get(0).(*model.Label)
    70  		}
    71  	}
    72  
    73  	var r1 error
    74  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    75  		r1 = rf(ctx, tenant, objectType, objectID, key)
    76  	} else {
    77  		r1 = ret.Error(1)
    78  	}
    79  
    80  	return r0, r1
    81  }
    82  
    83  // ListByKey provides a mock function with given fields: ctx, tenant, key
    84  func (_m *LabelRepository) ListByKey(ctx context.Context, tenant string, key string) ([]*model.Label, error) {
    85  	ret := _m.Called(ctx, tenant, key)
    86  
    87  	var r0 []*model.Label
    88  	if rf, ok := ret.Get(0).(func(context.Context, string, string) []*model.Label); ok {
    89  		r0 = rf(ctx, tenant, key)
    90  	} else {
    91  		if ret.Get(0) != nil {
    92  			r0 = ret.Get(0).([]*model.Label)
    93  		}
    94  	}
    95  
    96  	var r1 error
    97  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    98  		r1 = rf(ctx, tenant, key)
    99  	} else {
   100  		r1 = ret.Error(1)
   101  	}
   102  
   103  	return r0, r1
   104  }
   105  
   106  // ListForObject provides a mock function with given fields: ctx, tenant, objectType, objectID
   107  func (_m *LabelRepository) ListForObject(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) (map[string]*model.Label, error) {
   108  	ret := _m.Called(ctx, tenant, objectType, objectID)
   109  
   110  	var r0 map[string]*model.Label
   111  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string) map[string]*model.Label); ok {
   112  		r0 = rf(ctx, tenant, objectType, objectID)
   113  	} else {
   114  		if ret.Get(0) != nil {
   115  			r0 = ret.Get(0).(map[string]*model.Label)
   116  		}
   117  	}
   118  
   119  	var r1 error
   120  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string) error); ok {
   121  		r1 = rf(ctx, tenant, objectType, objectID)
   122  	} else {
   123  		r1 = ret.Error(1)
   124  	}
   125  
   126  	return r0, r1
   127  }
   128  
   129  type mockConstructorTestingTNewLabelRepository interface {
   130  	mock.TestingT
   131  	Cleanup(func())
   132  }
   133  
   134  // 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.
   135  func NewLabelRepository(t mockConstructorTestingTNewLabelRepository) *LabelRepository {
   136  	mock := &LabelRepository{}
   137  	mock.Mock.Test(t)
   138  
   139  	t.Cleanup(func() { mock.AssertExpectations(t) })
   140  
   141  	return mock
   142  }