github.com/mad-app/mattermost-server@v5.11.1+incompatible/store/storetest/mocks/OAuthStore.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make store-mocks`. 4 5 package mocks 6 7 import mock "github.com/stretchr/testify/mock" 8 import model "github.com/mattermost/mattermost-server/model" 9 import store "github.com/mattermost/mattermost-server/store" 10 11 // OAuthStore is an autogenerated mock type for the OAuthStore type 12 type OAuthStore struct { 13 mock.Mock 14 } 15 16 // DeleteApp provides a mock function with given fields: id 17 func (_m *OAuthStore) DeleteApp(id string) store.StoreChannel { 18 ret := _m.Called(id) 19 20 var r0 store.StoreChannel 21 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 22 r0 = rf(id) 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(store.StoreChannel) 26 } 27 } 28 29 return r0 30 } 31 32 // GetAccessData provides a mock function with given fields: token 33 func (_m *OAuthStore) GetAccessData(token string) store.StoreChannel { 34 ret := _m.Called(token) 35 36 var r0 store.StoreChannel 37 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 38 r0 = rf(token) 39 } else { 40 if ret.Get(0) != nil { 41 r0 = ret.Get(0).(store.StoreChannel) 42 } 43 } 44 45 return r0 46 } 47 48 // GetAccessDataByRefreshToken provides a mock function with given fields: token 49 func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) store.StoreChannel { 50 ret := _m.Called(token) 51 52 var r0 store.StoreChannel 53 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 54 r0 = rf(token) 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(store.StoreChannel) 58 } 59 } 60 61 return r0 62 } 63 64 // GetAccessDataByUserForApp provides a mock function with given fields: userId, clientId 65 func (_m *OAuthStore) GetAccessDataByUserForApp(userId string, clientId string) store.StoreChannel { 66 ret := _m.Called(userId, clientId) 67 68 var r0 store.StoreChannel 69 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 70 r0 = rf(userId, clientId) 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(store.StoreChannel) 74 } 75 } 76 77 return r0 78 } 79 80 // GetApp provides a mock function with given fields: id 81 func (_m *OAuthStore) GetApp(id string) store.StoreChannel { 82 ret := _m.Called(id) 83 84 var r0 store.StoreChannel 85 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 86 r0 = rf(id) 87 } else { 88 if ret.Get(0) != nil { 89 r0 = ret.Get(0).(store.StoreChannel) 90 } 91 } 92 93 return r0 94 } 95 96 // GetAppByUser provides a mock function with given fields: userId, offset, limit 97 func (_m *OAuthStore) GetAppByUser(userId string, offset int, limit int) store.StoreChannel { 98 ret := _m.Called(userId, offset, limit) 99 100 var r0 store.StoreChannel 101 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 102 r0 = rf(userId, offset, limit) 103 } else { 104 if ret.Get(0) != nil { 105 r0 = ret.Get(0).(store.StoreChannel) 106 } 107 } 108 109 return r0 110 } 111 112 // GetApps provides a mock function with given fields: offset, limit 113 func (_m *OAuthStore) GetApps(offset int, limit int) store.StoreChannel { 114 ret := _m.Called(offset, limit) 115 116 var r0 store.StoreChannel 117 if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { 118 r0 = rf(offset, limit) 119 } else { 120 if ret.Get(0) != nil { 121 r0 = ret.Get(0).(store.StoreChannel) 122 } 123 } 124 125 return r0 126 } 127 128 // GetAuthData provides a mock function with given fields: code 129 func (_m *OAuthStore) GetAuthData(code string) store.StoreChannel { 130 ret := _m.Called(code) 131 132 var r0 store.StoreChannel 133 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 134 r0 = rf(code) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).(store.StoreChannel) 138 } 139 } 140 141 return r0 142 } 143 144 // GetAuthorizedApps provides a mock function with given fields: userId, offset, limit 145 func (_m *OAuthStore) GetAuthorizedApps(userId string, offset int, limit int) store.StoreChannel { 146 ret := _m.Called(userId, offset, limit) 147 148 var r0 store.StoreChannel 149 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 150 r0 = rf(userId, offset, limit) 151 } else { 152 if ret.Get(0) != nil { 153 r0 = ret.Get(0).(store.StoreChannel) 154 } 155 } 156 157 return r0 158 } 159 160 // GetPreviousAccessData provides a mock function with given fields: userId, clientId 161 func (_m *OAuthStore) GetPreviousAccessData(userId string, clientId string) store.StoreChannel { 162 ret := _m.Called(userId, clientId) 163 164 var r0 store.StoreChannel 165 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 166 r0 = rf(userId, clientId) 167 } else { 168 if ret.Get(0) != nil { 169 r0 = ret.Get(0).(store.StoreChannel) 170 } 171 } 172 173 return r0 174 } 175 176 // PermanentDeleteAuthDataByUser provides a mock function with given fields: userId 177 func (_m *OAuthStore) PermanentDeleteAuthDataByUser(userId string) store.StoreChannel { 178 ret := _m.Called(userId) 179 180 var r0 store.StoreChannel 181 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 182 r0 = rf(userId) 183 } else { 184 if ret.Get(0) != nil { 185 r0 = ret.Get(0).(store.StoreChannel) 186 } 187 } 188 189 return r0 190 } 191 192 // RemoveAccessData provides a mock function with given fields: token 193 func (_m *OAuthStore) RemoveAccessData(token string) store.StoreChannel { 194 ret := _m.Called(token) 195 196 var r0 store.StoreChannel 197 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 198 r0 = rf(token) 199 } else { 200 if ret.Get(0) != nil { 201 r0 = ret.Get(0).(store.StoreChannel) 202 } 203 } 204 205 return r0 206 } 207 208 // RemoveAuthData provides a mock function with given fields: code 209 func (_m *OAuthStore) RemoveAuthData(code string) store.StoreChannel { 210 ret := _m.Called(code) 211 212 var r0 store.StoreChannel 213 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 214 r0 = rf(code) 215 } else { 216 if ret.Get(0) != nil { 217 r0 = ret.Get(0).(store.StoreChannel) 218 } 219 } 220 221 return r0 222 } 223 224 // SaveAccessData provides a mock function with given fields: accessData 225 func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) store.StoreChannel { 226 ret := _m.Called(accessData) 227 228 var r0 store.StoreChannel 229 if rf, ok := ret.Get(0).(func(*model.AccessData) store.StoreChannel); ok { 230 r0 = rf(accessData) 231 } else { 232 if ret.Get(0) != nil { 233 r0 = ret.Get(0).(store.StoreChannel) 234 } 235 } 236 237 return r0 238 } 239 240 // SaveApp provides a mock function with given fields: app 241 func (_m *OAuthStore) SaveApp(app *model.OAuthApp) store.StoreChannel { 242 ret := _m.Called(app) 243 244 var r0 store.StoreChannel 245 if rf, ok := ret.Get(0).(func(*model.OAuthApp) store.StoreChannel); ok { 246 r0 = rf(app) 247 } else { 248 if ret.Get(0) != nil { 249 r0 = ret.Get(0).(store.StoreChannel) 250 } 251 } 252 253 return r0 254 } 255 256 // SaveAuthData provides a mock function with given fields: authData 257 func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) store.StoreChannel { 258 ret := _m.Called(authData) 259 260 var r0 store.StoreChannel 261 if rf, ok := ret.Get(0).(func(*model.AuthData) store.StoreChannel); ok { 262 r0 = rf(authData) 263 } else { 264 if ret.Get(0) != nil { 265 r0 = ret.Get(0).(store.StoreChannel) 266 } 267 } 268 269 return r0 270 } 271 272 // UpdateAccessData provides a mock function with given fields: accessData 273 func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) store.StoreChannel { 274 ret := _m.Called(accessData) 275 276 var r0 store.StoreChannel 277 if rf, ok := ret.Get(0).(func(*model.AccessData) store.StoreChannel); ok { 278 r0 = rf(accessData) 279 } else { 280 if ret.Get(0) != nil { 281 r0 = ret.Get(0).(store.StoreChannel) 282 } 283 } 284 285 return r0 286 } 287 288 // UpdateApp provides a mock function with given fields: app 289 func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) store.StoreChannel { 290 ret := _m.Called(app) 291 292 var r0 store.StoreChannel 293 if rf, ok := ret.Get(0).(func(*model.OAuthApp) store.StoreChannel); ok { 294 r0 = rf(app) 295 } else { 296 if ret.Get(0) != nil { 297 r0 = ret.Get(0).(store.StoreChannel) 298 } 299 } 300 301 return r0 302 }