mock_auth_service_test.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package toc
  5. import (
  6. "context"
  7. "time"
  8. "github.com/google/uuid"
  9. "github.com/mk6i/open-oscar-server/config"
  10. "github.com/mk6i/open-oscar-server/state"
  11. "github.com/mk6i/open-oscar-server/wire"
  12. mock "github.com/stretchr/testify/mock"
  13. )
  14. // newMockAuthService creates a new instance of mockAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  15. // The first argument is typically a *testing.T value.
  16. func newMockAuthService(t interface {
  17. mock.TestingT
  18. Cleanup(func())
  19. }) *mockAuthService {
  20. mock := &mockAuthService{}
  21. mock.Mock.Test(t)
  22. t.Cleanup(func() { mock.AssertExpectations(t) })
  23. return mock
  24. }
  25. // mockAuthService is an autogenerated mock type for the AuthService type
  26. type mockAuthService struct {
  27. mock.Mock
  28. }
  29. type mockAuthService_Expecter struct {
  30. mock *mock.Mock
  31. }
  32. func (_m *mockAuthService) EXPECT() *mockAuthService_Expecter {
  33. return &mockAuthService_Expecter{mock: &_m.Mock}
  34. }
  35. // BUCPChallenge provides a mock function for the type mockAuthService
  36. func (_mock *mockAuthService) BUCPChallenge(ctx context.Context, inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error) {
  37. ret := _mock.Called(ctx, inBody, newUUID)
  38. if len(ret) == 0 {
  39. panic("no return value specified for BUCPChallenge")
  40. }
  41. var r0 wire.SNACMessage
  42. var r1 error
  43. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) (wire.SNACMessage, error)); ok {
  44. return returnFunc(ctx, inBody, newUUID)
  45. }
  46. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) wire.SNACMessage); ok {
  47. r0 = returnFunc(ctx, inBody, newUUID)
  48. } else {
  49. r0 = ret.Get(0).(wire.SNACMessage)
  50. }
  51. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) error); ok {
  52. r1 = returnFunc(ctx, inBody, newUUID)
  53. } else {
  54. r1 = ret.Error(1)
  55. }
  56. return r0, r1
  57. }
  58. // mockAuthService_BUCPChallenge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BUCPChallenge'
  59. type mockAuthService_BUCPChallenge_Call struct {
  60. *mock.Call
  61. }
  62. // BUCPChallenge is a helper method to define mock.On call
  63. // - ctx context.Context
  64. // - inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest
  65. // - newUUID func() uuid.UUID
  66. func (_e *mockAuthService_Expecter) BUCPChallenge(ctx interface{}, inBody interface{}, newUUID interface{}) *mockAuthService_BUCPChallenge_Call {
  67. return &mockAuthService_BUCPChallenge_Call{Call: _e.mock.On("BUCPChallenge", ctx, inBody, newUUID)}
  68. }
  69. func (_c *mockAuthService_BUCPChallenge_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID)) *mockAuthService_BUCPChallenge_Call {
  70. _c.Call.Run(func(args mock.Arguments) {
  71. var arg0 context.Context
  72. if args[0] != nil {
  73. arg0 = args[0].(context.Context)
  74. }
  75. var arg1 wire.SNAC_0x17_0x06_BUCPChallengeRequest
  76. if args[1] != nil {
  77. arg1 = args[1].(wire.SNAC_0x17_0x06_BUCPChallengeRequest)
  78. }
  79. var arg2 func() uuid.UUID
  80. if args[2] != nil {
  81. arg2 = args[2].(func() uuid.UUID)
  82. }
  83. run(
  84. arg0,
  85. arg1,
  86. arg2,
  87. )
  88. })
  89. return _c
  90. }
  91. func (_c *mockAuthService_BUCPChallenge_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_BUCPChallenge_Call {
  92. _c.Call.Return(sNACMessage, err)
  93. return _c
  94. }
  95. func (_c *mockAuthService_BUCPChallenge_Call) RunAndReturn(run func(ctx context.Context, inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error)) *mockAuthService_BUCPChallenge_Call {
  96. _c.Call.Return(run)
  97. return _c
  98. }
  99. // BUCPLogin provides a mock function for the type mockAuthService
  100. func (_mock *mockAuthService) BUCPLogin(ctx context.Context, inBody wire.SNAC_0x17_0x02_BUCPLoginRequest, endpointCfg config.Endpoint) (wire.SNACMessage, error) {
  101. ret := _mock.Called(ctx, inBody, endpointCfg)
  102. if len(ret) == 0 {
  103. panic("no return value specified for BUCPLogin")
  104. }
  105. var r0 wire.SNACMessage
  106. var r1 error
  107. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, config.Endpoint) (wire.SNACMessage, error)); ok {
  108. return returnFunc(ctx, inBody, endpointCfg)
  109. }
  110. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, config.Endpoint) wire.SNACMessage); ok {
  111. r0 = returnFunc(ctx, inBody, endpointCfg)
  112. } else {
  113. r0 = ret.Get(0).(wire.SNACMessage)
  114. }
  115. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, config.Endpoint) error); ok {
  116. r1 = returnFunc(ctx, inBody, endpointCfg)
  117. } else {
  118. r1 = ret.Error(1)
  119. }
  120. return r0, r1
  121. }
  122. // mockAuthService_BUCPLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BUCPLogin'
  123. type mockAuthService_BUCPLogin_Call struct {
  124. *mock.Call
  125. }
  126. // BUCPLogin is a helper method to define mock.On call
  127. // - ctx context.Context
  128. // - inBody wire.SNAC_0x17_0x02_BUCPLoginRequest
  129. // - endpointCfg config.Endpoint
  130. func (_e *mockAuthService_Expecter) BUCPLogin(ctx interface{}, inBody interface{}, endpointCfg interface{}) *mockAuthService_BUCPLogin_Call {
  131. return &mockAuthService_BUCPLogin_Call{Call: _e.mock.On("BUCPLogin", ctx, inBody, endpointCfg)}
  132. }
  133. func (_c *mockAuthService_BUCPLogin_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x17_0x02_BUCPLoginRequest, endpointCfg config.Endpoint)) *mockAuthService_BUCPLogin_Call {
  134. _c.Call.Run(func(args mock.Arguments) {
  135. var arg0 context.Context
  136. if args[0] != nil {
  137. arg0 = args[0].(context.Context)
  138. }
  139. var arg1 wire.SNAC_0x17_0x02_BUCPLoginRequest
  140. if args[1] != nil {
  141. arg1 = args[1].(wire.SNAC_0x17_0x02_BUCPLoginRequest)
  142. }
  143. var arg2 config.Endpoint
  144. if args[2] != nil {
  145. arg2 = args[2].(config.Endpoint)
  146. }
  147. run(
  148. arg0,
  149. arg1,
  150. arg2,
  151. )
  152. })
  153. return _c
  154. }
  155. func (_c *mockAuthService_BUCPLogin_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_BUCPLogin_Call {
  156. _c.Call.Return(sNACMessage, err)
  157. return _c
  158. }
  159. func (_c *mockAuthService_BUCPLogin_Call) RunAndReturn(run func(ctx context.Context, inBody wire.SNAC_0x17_0x02_BUCPLoginRequest, endpointCfg config.Endpoint) (wire.SNACMessage, error)) *mockAuthService_BUCPLogin_Call {
  160. _c.Call.Return(run)
  161. return _c
  162. }
  163. // CrackCookie provides a mock function for the type mockAuthService
  164. func (_mock *mockAuthService) CrackCookie(authCookie []byte) (state.ServerCookie, time.Time, error) {
  165. ret := _mock.Called(authCookie)
  166. if len(ret) == 0 {
  167. panic("no return value specified for CrackCookie")
  168. }
  169. var r0 state.ServerCookie
  170. var r1 time.Time
  171. var r2 error
  172. if returnFunc, ok := ret.Get(0).(func([]byte) (state.ServerCookie, time.Time, error)); ok {
  173. return returnFunc(authCookie)
  174. }
  175. if returnFunc, ok := ret.Get(0).(func([]byte) state.ServerCookie); ok {
  176. r0 = returnFunc(authCookie)
  177. } else {
  178. r0 = ret.Get(0).(state.ServerCookie)
  179. }
  180. if returnFunc, ok := ret.Get(1).(func([]byte) time.Time); ok {
  181. r1 = returnFunc(authCookie)
  182. } else {
  183. r1 = ret.Get(1).(time.Time)
  184. }
  185. if returnFunc, ok := ret.Get(2).(func([]byte) error); ok {
  186. r2 = returnFunc(authCookie)
  187. } else {
  188. r2 = ret.Error(2)
  189. }
  190. return r0, r1, r2
  191. }
  192. // mockAuthService_CrackCookie_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CrackCookie'
  193. type mockAuthService_CrackCookie_Call struct {
  194. *mock.Call
  195. }
  196. // CrackCookie is a helper method to define mock.On call
  197. // - authCookie []byte
  198. func (_e *mockAuthService_Expecter) CrackCookie(authCookie interface{}) *mockAuthService_CrackCookie_Call {
  199. return &mockAuthService_CrackCookie_Call{Call: _e.mock.On("CrackCookie", authCookie)}
  200. }
  201. func (_c *mockAuthService_CrackCookie_Call) Run(run func(authCookie []byte)) *mockAuthService_CrackCookie_Call {
  202. _c.Call.Run(func(args mock.Arguments) {
  203. var arg0 []byte
  204. if args[0] != nil {
  205. arg0 = args[0].([]byte)
  206. }
  207. run(
  208. arg0,
  209. )
  210. })
  211. return _c
  212. }
  213. func (_c *mockAuthService_CrackCookie_Call) Return(serverCookie state.ServerCookie, time1 time.Time, err error) *mockAuthService_CrackCookie_Call {
  214. _c.Call.Return(serverCookie, time1, err)
  215. return _c
  216. }
  217. func (_c *mockAuthService_CrackCookie_Call) RunAndReturn(run func(authCookie []byte) (state.ServerCookie, time.Time, error)) *mockAuthService_CrackCookie_Call {
  218. _c.Call.Return(run)
  219. return _c
  220. }
  221. // FLAPLogin provides a mock function for the type mockAuthService
  222. func (_mock *mockAuthService) FLAPLogin(ctx context.Context, inFrame wire.FLAPSignonFrame, endpointCfg config.Endpoint) (wire.TLVRestBlock, error) {
  223. ret := _mock.Called(ctx, inFrame, endpointCfg)
  224. if len(ret) == 0 {
  225. panic("no return value specified for FLAPLogin")
  226. }
  227. var r0 wire.TLVRestBlock
  228. var r1 error
  229. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, config.Endpoint) (wire.TLVRestBlock, error)); ok {
  230. return returnFunc(ctx, inFrame, endpointCfg)
  231. }
  232. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, config.Endpoint) wire.TLVRestBlock); ok {
  233. r0 = returnFunc(ctx, inFrame, endpointCfg)
  234. } else {
  235. r0 = ret.Get(0).(wire.TLVRestBlock)
  236. }
  237. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.FLAPSignonFrame, config.Endpoint) error); ok {
  238. r1 = returnFunc(ctx, inFrame, endpointCfg)
  239. } else {
  240. r1 = ret.Error(1)
  241. }
  242. return r0, r1
  243. }
  244. // mockAuthService_FLAPLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FLAPLogin'
  245. type mockAuthService_FLAPLogin_Call struct {
  246. *mock.Call
  247. }
  248. // FLAPLogin is a helper method to define mock.On call
  249. // - ctx context.Context
  250. // - inFrame wire.FLAPSignonFrame
  251. // - endpointCfg config.Endpoint
  252. func (_e *mockAuthService_Expecter) FLAPLogin(ctx interface{}, inFrame interface{}, endpointCfg interface{}) *mockAuthService_FLAPLogin_Call {
  253. return &mockAuthService_FLAPLogin_Call{Call: _e.mock.On("FLAPLogin", ctx, inFrame, endpointCfg)}
  254. }
  255. func (_c *mockAuthService_FLAPLogin_Call) Run(run func(ctx context.Context, inFrame wire.FLAPSignonFrame, endpointCfg config.Endpoint)) *mockAuthService_FLAPLogin_Call {
  256. _c.Call.Run(func(args mock.Arguments) {
  257. var arg0 context.Context
  258. if args[0] != nil {
  259. arg0 = args[0].(context.Context)
  260. }
  261. var arg1 wire.FLAPSignonFrame
  262. if args[1] != nil {
  263. arg1 = args[1].(wire.FLAPSignonFrame)
  264. }
  265. var arg2 config.Endpoint
  266. if args[2] != nil {
  267. arg2 = args[2].(config.Endpoint)
  268. }
  269. run(
  270. arg0,
  271. arg1,
  272. arg2,
  273. )
  274. })
  275. return _c
  276. }
  277. func (_c *mockAuthService_FLAPLogin_Call) Return(tLVRestBlock wire.TLVRestBlock, err error) *mockAuthService_FLAPLogin_Call {
  278. _c.Call.Return(tLVRestBlock, err)
  279. return _c
  280. }
  281. func (_c *mockAuthService_FLAPLogin_Call) RunAndReturn(run func(ctx context.Context, inFrame wire.FLAPSignonFrame, endpointCfg config.Endpoint) (wire.TLVRestBlock, error)) *mockAuthService_FLAPLogin_Call {
  282. _c.Call.Return(run)
  283. return _c
  284. }
  285. // RegisterBOSSession provides a mock function for the type mockAuthService
  286. func (_mock *mockAuthService) RegisterBOSSession(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session)) (*state.SessionInstance, error) {
  287. ret := _mock.Called(ctx, authCookie, cfg)
  288. if len(ret) == 0 {
  289. panic("no return value specified for RegisterBOSSession")
  290. }
  291. var r0 *state.SessionInstance
  292. var r1 error
  293. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(*state.Session)) (*state.SessionInstance, error)); ok {
  294. return returnFunc(ctx, authCookie, cfg)
  295. }
  296. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(*state.Session)) *state.SessionInstance); ok {
  297. r0 = returnFunc(ctx, authCookie, cfg)
  298. } else {
  299. if ret.Get(0) != nil {
  300. r0 = ret.Get(0).(*state.SessionInstance)
  301. }
  302. }
  303. if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie, func(*state.Session)) error); ok {
  304. r1 = returnFunc(ctx, authCookie, cfg)
  305. } else {
  306. r1 = ret.Error(1)
  307. }
  308. return r0, r1
  309. }
  310. // mockAuthService_RegisterBOSSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterBOSSession'
  311. type mockAuthService_RegisterBOSSession_Call struct {
  312. *mock.Call
  313. }
  314. // RegisterBOSSession is a helper method to define mock.On call
  315. // - ctx context.Context
  316. // - authCookie state.ServerCookie
  317. // - cfg func(*state.Session)
  318. func (_e *mockAuthService_Expecter) RegisterBOSSession(ctx interface{}, authCookie interface{}, cfg interface{}) *mockAuthService_RegisterBOSSession_Call {
  319. return &mockAuthService_RegisterBOSSession_Call{Call: _e.mock.On("RegisterBOSSession", ctx, authCookie, cfg)}
  320. }
  321. func (_c *mockAuthService_RegisterBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session))) *mockAuthService_RegisterBOSSession_Call {
  322. _c.Call.Run(func(args mock.Arguments) {
  323. var arg0 context.Context
  324. if args[0] != nil {
  325. arg0 = args[0].(context.Context)
  326. }
  327. var arg1 state.ServerCookie
  328. if args[1] != nil {
  329. arg1 = args[1].(state.ServerCookie)
  330. }
  331. var arg2 func(*state.Session)
  332. if args[2] != nil {
  333. arg2 = args[2].(func(*state.Session))
  334. }
  335. run(
  336. arg0,
  337. arg1,
  338. arg2,
  339. )
  340. })
  341. return _c
  342. }
  343. func (_c *mockAuthService_RegisterBOSSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RegisterBOSSession_Call {
  344. _c.Call.Return(sessionInstance, err)
  345. return _c
  346. }
  347. func (_c *mockAuthService_RegisterBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session)) (*state.SessionInstance, error)) *mockAuthService_RegisterBOSSession_Call {
  348. _c.Call.Return(run)
  349. return _c
  350. }
  351. // RegisterChatSession provides a mock function for the type mockAuthService
  352. func (_mock *mockAuthService) RegisterChatSession(ctx context.Context, authCookie state.ServerCookie, cfg func(sess *state.Session)) (*state.SessionInstance, error) {
  353. ret := _mock.Called(ctx, authCookie, cfg)
  354. if len(ret) == 0 {
  355. panic("no return value specified for RegisterChatSession")
  356. }
  357. var r0 *state.SessionInstance
  358. var r1 error
  359. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(sess *state.Session)) (*state.SessionInstance, error)); ok {
  360. return returnFunc(ctx, authCookie, cfg)
  361. }
  362. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(sess *state.Session)) *state.SessionInstance); ok {
  363. r0 = returnFunc(ctx, authCookie, cfg)
  364. } else {
  365. if ret.Get(0) != nil {
  366. r0 = ret.Get(0).(*state.SessionInstance)
  367. }
  368. }
  369. if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie, func(sess *state.Session)) error); ok {
  370. r1 = returnFunc(ctx, authCookie, cfg)
  371. } else {
  372. r1 = ret.Error(1)
  373. }
  374. return r0, r1
  375. }
  376. // mockAuthService_RegisterChatSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterChatSession'
  377. type mockAuthService_RegisterChatSession_Call struct {
  378. *mock.Call
  379. }
  380. // RegisterChatSession is a helper method to define mock.On call
  381. // - ctx context.Context
  382. // - authCookie state.ServerCookie
  383. // - cfg func(sess *state.Session)
  384. func (_e *mockAuthService_Expecter) RegisterChatSession(ctx interface{}, authCookie interface{}, cfg interface{}) *mockAuthService_RegisterChatSession_Call {
  385. return &mockAuthService_RegisterChatSession_Call{Call: _e.mock.On("RegisterChatSession", ctx, authCookie, cfg)}
  386. }
  387. func (_c *mockAuthService_RegisterChatSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(sess *state.Session))) *mockAuthService_RegisterChatSession_Call {
  388. _c.Call.Run(func(args mock.Arguments) {
  389. var arg0 context.Context
  390. if args[0] != nil {
  391. arg0 = args[0].(context.Context)
  392. }
  393. var arg1 state.ServerCookie
  394. if args[1] != nil {
  395. arg1 = args[1].(state.ServerCookie)
  396. }
  397. var arg2 func(sess *state.Session)
  398. if args[2] != nil {
  399. arg2 = args[2].(func(sess *state.Session))
  400. }
  401. run(
  402. arg0,
  403. arg1,
  404. arg2,
  405. )
  406. })
  407. return _c
  408. }
  409. func (_c *mockAuthService_RegisterChatSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RegisterChatSession_Call {
  410. _c.Call.Return(sessionInstance, err)
  411. return _c
  412. }
  413. func (_c *mockAuthService_RegisterChatSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(sess *state.Session)) (*state.SessionInstance, error)) *mockAuthService_RegisterChatSession_Call {
  414. _c.Call.Return(run)
  415. return _c
  416. }
  417. // RetrieveBOSSession provides a mock function for the type mockAuthService
  418. func (_mock *mockAuthService) RetrieveBOSSession(ctx context.Context, authCookie state.ServerCookie) (*state.SessionInstance, error) {
  419. ret := _mock.Called(ctx, authCookie)
  420. if len(ret) == 0 {
  421. panic("no return value specified for RetrieveBOSSession")
  422. }
  423. var r0 *state.SessionInstance
  424. var r1 error
  425. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.SessionInstance, error)); ok {
  426. return returnFunc(ctx, authCookie)
  427. }
  428. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.SessionInstance); ok {
  429. r0 = returnFunc(ctx, authCookie)
  430. } else {
  431. if ret.Get(0) != nil {
  432. r0 = ret.Get(0).(*state.SessionInstance)
  433. }
  434. }
  435. if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
  436. r1 = returnFunc(ctx, authCookie)
  437. } else {
  438. r1 = ret.Error(1)
  439. }
  440. return r0, r1
  441. }
  442. // mockAuthService_RetrieveBOSSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveBOSSession'
  443. type mockAuthService_RetrieveBOSSession_Call struct {
  444. *mock.Call
  445. }
  446. // RetrieveBOSSession is a helper method to define mock.On call
  447. // - ctx context.Context
  448. // - authCookie state.ServerCookie
  449. func (_e *mockAuthService_Expecter) RetrieveBOSSession(ctx interface{}, authCookie interface{}) *mockAuthService_RetrieveBOSSession_Call {
  450. return &mockAuthService_RetrieveBOSSession_Call{Call: _e.mock.On("RetrieveBOSSession", ctx, authCookie)}
  451. }
  452. func (_c *mockAuthService_RetrieveBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie)) *mockAuthService_RetrieveBOSSession_Call {
  453. _c.Call.Run(func(args mock.Arguments) {
  454. var arg0 context.Context
  455. if args[0] != nil {
  456. arg0 = args[0].(context.Context)
  457. }
  458. var arg1 state.ServerCookie
  459. if args[1] != nil {
  460. arg1 = args[1].(state.ServerCookie)
  461. }
  462. run(
  463. arg0,
  464. arg1,
  465. )
  466. })
  467. return _c
  468. }
  469. func (_c *mockAuthService_RetrieveBOSSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RetrieveBOSSession_Call {
  470. _c.Call.Return(sessionInstance, err)
  471. return _c
  472. }
  473. func (_c *mockAuthService_RetrieveBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie) (*state.SessionInstance, error)) *mockAuthService_RetrieveBOSSession_Call {
  474. _c.Call.Return(run)
  475. return _c
  476. }
  477. // Signout provides a mock function for the type mockAuthService
  478. func (_mock *mockAuthService) Signout(ctx context.Context, session *state.Session) {
  479. _mock.Called(ctx, session)
  480. return
  481. }
  482. // mockAuthService_Signout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Signout'
  483. type mockAuthService_Signout_Call struct {
  484. *mock.Call
  485. }
  486. // Signout is a helper method to define mock.On call
  487. // - ctx context.Context
  488. // - session *state.Session
  489. func (_e *mockAuthService_Expecter) Signout(ctx interface{}, session interface{}) *mockAuthService_Signout_Call {
  490. return &mockAuthService_Signout_Call{Call: _e.mock.On("Signout", ctx, session)}
  491. }
  492. func (_c *mockAuthService_Signout_Call) Run(run func(ctx context.Context, session *state.Session)) *mockAuthService_Signout_Call {
  493. _c.Call.Run(func(args mock.Arguments) {
  494. var arg0 context.Context
  495. if args[0] != nil {
  496. arg0 = args[0].(context.Context)
  497. }
  498. var arg1 *state.Session
  499. if args[1] != nil {
  500. arg1 = args[1].(*state.Session)
  501. }
  502. run(
  503. arg0,
  504. arg1,
  505. )
  506. })
  507. return _c
  508. }
  509. func (_c *mockAuthService_Signout_Call) Return() *mockAuthService_Signout_Call {
  510. _c.Call.Return()
  511. return _c
  512. }
  513. func (_c *mockAuthService_Signout_Call) RunAndReturn(run func(ctx context.Context, session *state.Session)) *mockAuthService_Signout_Call {
  514. _c.Run(run)
  515. return _c
  516. }
  517. // SignoutChat provides a mock function for the type mockAuthService
  518. func (_mock *mockAuthService) SignoutChat(ctx context.Context, sess *state.Session) {
  519. _mock.Called(ctx, sess)
  520. return
  521. }
  522. // mockAuthService_SignoutChat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignoutChat'
  523. type mockAuthService_SignoutChat_Call struct {
  524. *mock.Call
  525. }
  526. // SignoutChat is a helper method to define mock.On call
  527. // - ctx context.Context
  528. // - sess *state.Session
  529. func (_e *mockAuthService_Expecter) SignoutChat(ctx interface{}, sess interface{}) *mockAuthService_SignoutChat_Call {
  530. return &mockAuthService_SignoutChat_Call{Call: _e.mock.On("SignoutChat", ctx, sess)}
  531. }
  532. func (_c *mockAuthService_SignoutChat_Call) Run(run func(ctx context.Context, sess *state.Session)) *mockAuthService_SignoutChat_Call {
  533. _c.Call.Run(func(args mock.Arguments) {
  534. var arg0 context.Context
  535. if args[0] != nil {
  536. arg0 = args[0].(context.Context)
  537. }
  538. var arg1 *state.Session
  539. if args[1] != nil {
  540. arg1 = args[1].(*state.Session)
  541. }
  542. run(
  543. arg0,
  544. arg1,
  545. )
  546. })
  547. return _c
  548. }
  549. func (_c *mockAuthService_SignoutChat_Call) Return() *mockAuthService_SignoutChat_Call {
  550. _c.Call.Return()
  551. return _c
  552. }
  553. func (_c *mockAuthService_SignoutChat_Call) RunAndReturn(run func(ctx context.Context, sess *state.Session)) *mockAuthService_SignoutChat_Call {
  554. _c.Run(run)
  555. return _c
  556. }