github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/application/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  // GetByKey provides a mock function with given fields: ctx, tenant, objectType, objectID, key
    46  func (_m *LabelRepository) GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) (*model.Label, error) {
    47  	ret := _m.Called(ctx, tenant, objectType, objectID, key)
    48  
    49  	var r0 *model.Label
    50  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string, string) *model.Label); ok {
    51  		r0 = rf(ctx, tenant, objectType, objectID, key)
    52  	} else {
    53  		if ret.Get(0) != nil {
    54  			r0 = ret.Get(0).(*model.Label)
    55  		}
    56  	}
    57  
    58  	var r1 error
    59  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string, string) error); ok {
    60  		r1 = rf(ctx, tenant, objectType, objectID, key)
    61  	} else {
    62  		r1 = ret.Error(1)
    63  	}
    64  
    65  	return r0, r1
    66  }
    67  
    68  // ListForObject provides a mock function with given fields: ctx, tenant, objectType, objectID
    69  func (_m *LabelRepository) ListForObject(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) (map[string]*model.Label, error) {
    70  	ret := _m.Called(ctx, tenant, objectType, objectID)
    71  
    72  	var r0 map[string]*model.Label
    73  	if rf, ok := ret.Get(0).(func(context.Context, string, model.LabelableObject, string) map[string]*model.Label); ok {
    74  		r0 = rf(ctx, tenant, objectType, objectID)
    75  	} else {
    76  		if ret.Get(0) != nil {
    77  			r0 = ret.Get(0).(map[string]*model.Label)
    78  		}
    79  	}
    80  
    81  	var r1 error
    82  	if rf, ok := ret.Get(1).(func(context.Context, string, model.LabelableObject, string) error); ok {
    83  		r1 = rf(ctx, tenant, objectType, objectID)
    84  	} else {
    85  		r1 = ret.Error(1)
    86  	}
    87  
    88  	return r0, r1
    89  }
    90  
    91  // ListGlobalByKey provides a mock function with given fields: ctx, key
    92  func (_m *LabelRepository) ListGlobalByKey(ctx context.Context, key string) ([]*model.Label, error) {
    93  	ret := _m.Called(ctx, key)
    94  
    95  	var r0 []*model.Label
    96  	if rf, ok := ret.Get(0).(func(context.Context, string) []*model.Label); ok {
    97  		r0 = rf(ctx, key)
    98  	} else {
    99  		if ret.Get(0) != nil {
   100  			r0 = ret.Get(0).([]*model.Label)
   101  		}
   102  	}
   103  
   104  	var r1 error
   105  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
   106  		r1 = rf(ctx, key)
   107  	} else {
   108  		r1 = ret.Error(1)
   109  	}
   110  
   111  	return r0, r1
   112  }
   113  
   114  // ListGlobalByKeyAndObjects provides a mock function with given fields: ctx, objectType, objectIDs, key
   115  func (_m *LabelRepository) ListGlobalByKeyAndObjects(ctx context.Context, objectType model.LabelableObject, objectIDs []string, key string) ([]*model.Label, error) {
   116  	ret := _m.Called(ctx, objectType, objectIDs, key)
   117  
   118  	var r0 []*model.Label
   119  	if rf, ok := ret.Get(0).(func(context.Context, model.LabelableObject, []string, string) []*model.Label); ok {
   120  		r0 = rf(ctx, objectType, objectIDs, key)
   121  	} else {
   122  		if ret.Get(0) != nil {
   123  			r0 = ret.Get(0).([]*model.Label)
   124  		}
   125  	}
   126  
   127  	var r1 error
   128  	if rf, ok := ret.Get(1).(func(context.Context, model.LabelableObject, []string, string) error); ok {
   129  		r1 = rf(ctx, objectType, objectIDs, key)
   130  	} else {
   131  		r1 = ret.Error(1)
   132  	}
   133  
   134  	return r0, r1
   135  }
   136  
   137  type mockConstructorTestingTNewLabelRepository interface {
   138  	mock.TestingT
   139  	Cleanup(func())
   140  }
   141  
   142  // 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.
   143  func NewLabelRepository(t mockConstructorTestingTNewLabelRepository) *LabelRepository {
   144  	mock := &LabelRepository{}
   145  	mock.Mock.Test(t)
   146  
   147  	t.Cleanup(func() { mock.AssertExpectations(t) })
   148  
   149  	return mock
   150  }