github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/systemauth/automock/system_auth_service.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 internalmodel "github.com/kyma-incubator/compass/components/director/internal/model" 9 mock "github.com/stretchr/testify/mock" 10 11 model "github.com/kyma-incubator/compass/components/director/pkg/model" 12 ) 13 14 // SystemAuthService is an autogenerated mock type for the SystemAuthService type 15 type SystemAuthService struct { 16 mock.Mock 17 } 18 19 // DeleteByIDForObject provides a mock function with given fields: ctx, objectType, authID 20 func (_m *SystemAuthService) DeleteByIDForObject(ctx context.Context, objectType model.SystemAuthReferenceObjectType, authID string) error { 21 ret := _m.Called(ctx, objectType, authID) 22 23 var r0 error 24 if rf, ok := ret.Get(0).(func(context.Context, model.SystemAuthReferenceObjectType, string) error); ok { 25 r0 = rf(ctx, objectType, authID) 26 } else { 27 r0 = ret.Error(0) 28 } 29 30 return r0 31 } 32 33 // GetByIDForObject provides a mock function with given fields: ctx, objectType, authID 34 func (_m *SystemAuthService) GetByIDForObject(ctx context.Context, objectType model.SystemAuthReferenceObjectType, authID string) (*model.SystemAuth, error) { 35 ret := _m.Called(ctx, objectType, authID) 36 37 var r0 *model.SystemAuth 38 if rf, ok := ret.Get(0).(func(context.Context, model.SystemAuthReferenceObjectType, string) *model.SystemAuth); ok { 39 r0 = rf(ctx, objectType, authID) 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(*model.SystemAuth) 43 } 44 } 45 46 var r1 error 47 if rf, ok := ret.Get(1).(func(context.Context, model.SystemAuthReferenceObjectType, string) error); ok { 48 r1 = rf(ctx, objectType, authID) 49 } else { 50 r1 = ret.Error(1) 51 } 52 53 return r0, r1 54 } 55 56 // GetByToken provides a mock function with given fields: ctx, token 57 func (_m *SystemAuthService) GetByToken(ctx context.Context, token string) (*model.SystemAuth, error) { 58 ret := _m.Called(ctx, token) 59 60 var r0 *model.SystemAuth 61 if rf, ok := ret.Get(0).(func(context.Context, string) *model.SystemAuth); ok { 62 r0 = rf(ctx, token) 63 } else { 64 if ret.Get(0) != nil { 65 r0 = ret.Get(0).(*model.SystemAuth) 66 } 67 } 68 69 var r1 error 70 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 71 r1 = rf(ctx, token) 72 } else { 73 r1 = ret.Error(1) 74 } 75 76 return r0, r1 77 } 78 79 // GetGlobal provides a mock function with given fields: ctx, id 80 func (_m *SystemAuthService) GetGlobal(ctx context.Context, id string) (*model.SystemAuth, error) { 81 ret := _m.Called(ctx, id) 82 83 var r0 *model.SystemAuth 84 if rf, ok := ret.Get(0).(func(context.Context, string) *model.SystemAuth); ok { 85 r0 = rf(ctx, id) 86 } else { 87 if ret.Get(0) != nil { 88 r0 = ret.Get(0).(*model.SystemAuth) 89 } 90 } 91 92 var r1 error 93 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 94 r1 = rf(ctx, id) 95 } else { 96 r1 = ret.Error(1) 97 } 98 99 return r0, r1 100 } 101 102 // InvalidateToken provides a mock function with given fields: ctx, id 103 func (_m *SystemAuthService) InvalidateToken(ctx context.Context, id string) (*model.SystemAuth, error) { 104 ret := _m.Called(ctx, id) 105 106 var r0 *model.SystemAuth 107 if rf, ok := ret.Get(0).(func(context.Context, string) *model.SystemAuth); ok { 108 r0 = rf(ctx, id) 109 } else { 110 if ret.Get(0) != nil { 111 r0 = ret.Get(0).(*model.SystemAuth) 112 } 113 } 114 115 var r1 error 116 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 117 r1 = rf(ctx, id) 118 } else { 119 r1 = ret.Error(1) 120 } 121 122 return r0, r1 123 } 124 125 // Update provides a mock function with given fields: ctx, item 126 func (_m *SystemAuthService) Update(ctx context.Context, item *model.SystemAuth) error { 127 ret := _m.Called(ctx, item) 128 129 var r0 error 130 if rf, ok := ret.Get(0).(func(context.Context, *model.SystemAuth) error); ok { 131 r0 = rf(ctx, item) 132 } else { 133 r0 = ret.Error(0) 134 } 135 136 return r0 137 } 138 139 // UpdateValue provides a mock function with given fields: ctx, id, item 140 func (_m *SystemAuthService) UpdateValue(ctx context.Context, id string, item *internalmodel.Auth) (*model.SystemAuth, error) { 141 ret := _m.Called(ctx, id, item) 142 143 var r0 *model.SystemAuth 144 if rf, ok := ret.Get(0).(func(context.Context, string, *internalmodel.Auth) *model.SystemAuth); ok { 145 r0 = rf(ctx, id, item) 146 } else { 147 if ret.Get(0) != nil { 148 r0 = ret.Get(0).(*model.SystemAuth) 149 } 150 } 151 152 var r1 error 153 if rf, ok := ret.Get(1).(func(context.Context, string, *internalmodel.Auth) error); ok { 154 r1 = rf(ctx, id, item) 155 } else { 156 r1 = ret.Error(1) 157 } 158 159 return r0, r1 160 } 161 162 type mockConstructorTestingTNewSystemAuthService interface { 163 mock.TestingT 164 Cleanup(func()) 165 } 166 167 // NewSystemAuthService creates a new instance of SystemAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 168 func NewSystemAuthService(t mockConstructorTestingTNewSystemAuthService) *SystemAuthService { 169 mock := &SystemAuthService{} 170 mock.Mock.Test(t) 171 172 t.Cleanup(func() { mock.AssertExpectations(t) }) 173 174 return mock 175 }