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