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