github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/tombstone/automock/tombstone_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 resource "github.com/kyma-incubator/compass/components/director/pkg/resource" 12 ) 13 14 // TombstoneRepository is an autogenerated mock type for the TombstoneRepository type 15 type TombstoneRepository struct { 16 mock.Mock 17 } 18 19 // Create provides a mock function with given fields: ctx, tenant, item 20 func (_m *TombstoneRepository) Create(ctx context.Context, tenant string, item *model.Tombstone) error { 21 ret := _m.Called(ctx, tenant, item) 22 23 var r0 error 24 if rf, ok := ret.Get(0).(func(context.Context, string, *model.Tombstone) error); ok { 25 r0 = rf(ctx, tenant, item) 26 } else { 27 r0 = ret.Error(0) 28 } 29 30 return r0 31 } 32 33 // CreateGlobal provides a mock function with given fields: ctx, _a1 34 func (_m *TombstoneRepository) CreateGlobal(ctx context.Context, _a1 *model.Tombstone) error { 35 ret := _m.Called(ctx, _a1) 36 37 var r0 error 38 if rf, ok := ret.Get(0).(func(context.Context, *model.Tombstone) error); ok { 39 r0 = rf(ctx, _a1) 40 } else { 41 r0 = ret.Error(0) 42 } 43 44 return r0 45 } 46 47 // Delete provides a mock function with given fields: ctx, tenant, id 48 func (_m *TombstoneRepository) Delete(ctx context.Context, tenant string, id string) error { 49 ret := _m.Called(ctx, tenant, id) 50 51 var r0 error 52 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 53 r0 = rf(ctx, tenant, id) 54 } else { 55 r0 = ret.Error(0) 56 } 57 58 return r0 59 } 60 61 // Exists provides a mock function with given fields: ctx, tenant, id 62 func (_m *TombstoneRepository) Exists(ctx context.Context, tenant string, id string) (bool, error) { 63 ret := _m.Called(ctx, tenant, id) 64 65 var r0 bool 66 if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { 67 r0 = rf(ctx, tenant, id) 68 } else { 69 r0 = ret.Get(0).(bool) 70 } 71 72 var r1 error 73 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 74 r1 = rf(ctx, tenant, id) 75 } else { 76 r1 = ret.Error(1) 77 } 78 79 return r0, r1 80 } 81 82 // GetByID provides a mock function with given fields: ctx, tenant, id 83 func (_m *TombstoneRepository) GetByID(ctx context.Context, tenant string, id string) (*model.Tombstone, error) { 84 ret := _m.Called(ctx, tenant, id) 85 86 var r0 *model.Tombstone 87 if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Tombstone); ok { 88 r0 = rf(ctx, tenant, id) 89 } else { 90 if ret.Get(0) != nil { 91 r0 = ret.Get(0).(*model.Tombstone) 92 } 93 } 94 95 var r1 error 96 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 97 r1 = rf(ctx, tenant, id) 98 } else { 99 r1 = ret.Error(1) 100 } 101 102 return r0, r1 103 } 104 105 // GetByIDGlobal provides a mock function with given fields: ctx, id 106 func (_m *TombstoneRepository) GetByIDGlobal(ctx context.Context, id string) (*model.Tombstone, error) { 107 ret := _m.Called(ctx, id) 108 109 var r0 *model.Tombstone 110 if rf, ok := ret.Get(0).(func(context.Context, string) *model.Tombstone); ok { 111 r0 = rf(ctx, id) 112 } else { 113 if ret.Get(0) != nil { 114 r0 = ret.Get(0).(*model.Tombstone) 115 } 116 } 117 118 var r1 error 119 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 120 r1 = rf(ctx, id) 121 } else { 122 r1 = ret.Error(1) 123 } 124 125 return r0, r1 126 } 127 128 // ListByResourceID provides a mock function with given fields: ctx, tenantID, resourceID, resourceType 129 func (_m *TombstoneRepository) ListByResourceID(ctx context.Context, tenantID string, resourceID string, resourceType resource.Type) ([]*model.Tombstone, error) { 130 ret := _m.Called(ctx, tenantID, resourceID, resourceType) 131 132 var r0 []*model.Tombstone 133 if rf, ok := ret.Get(0).(func(context.Context, string, string, resource.Type) []*model.Tombstone); ok { 134 r0 = rf(ctx, tenantID, resourceID, resourceType) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).([]*model.Tombstone) 138 } 139 } 140 141 var r1 error 142 if rf, ok := ret.Get(1).(func(context.Context, string, string, resource.Type) error); ok { 143 r1 = rf(ctx, tenantID, resourceID, resourceType) 144 } else { 145 r1 = ret.Error(1) 146 } 147 148 return r0, r1 149 } 150 151 // Update provides a mock function with given fields: ctx, tenant, item 152 func (_m *TombstoneRepository) Update(ctx context.Context, tenant string, item *model.Tombstone) error { 153 ret := _m.Called(ctx, tenant, item) 154 155 var r0 error 156 if rf, ok := ret.Get(0).(func(context.Context, string, *model.Tombstone) error); ok { 157 r0 = rf(ctx, tenant, item) 158 } else { 159 r0 = ret.Error(0) 160 } 161 162 return r0 163 } 164 165 // UpdateGlobal provides a mock function with given fields: ctx, _a1 166 func (_m *TombstoneRepository) UpdateGlobal(ctx context.Context, _a1 *model.Tombstone) error { 167 ret := _m.Called(ctx, _a1) 168 169 var r0 error 170 if rf, ok := ret.Get(0).(func(context.Context, *model.Tombstone) error); ok { 171 r0 = rf(ctx, _a1) 172 } else { 173 r0 = ret.Error(0) 174 } 175 176 return r0 177 } 178 179 type mockConstructorTestingTNewTombstoneRepository interface { 180 mock.TestingT 181 Cleanup(func()) 182 } 183 184 // NewTombstoneRepository creates a new instance of TombstoneRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 185 func NewTombstoneRepository(t mockConstructorTestingTNewTombstoneRepository) *TombstoneRepository { 186 mock := &TombstoneRepository{} 187 mock.Mock.Test(t) 188 189 t.Cleanup(func() { mock.AssertExpectations(t) }) 190 191 return mock 192 }