asconn.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Code generated by mockery v2.13.1. DO NOT EDIT.
  2. package mocks
  3. import (
  4. time "time"
  5. aerospike "github.com/aerospike/aerospike-client-go/v6"
  6. mock "github.com/stretchr/testify/mock"
  7. )
  8. // Asconn is an autogenerated mock type for the asconn type
  9. type Asconn struct {
  10. mock.Mock
  11. }
  12. // Close provides a mock function with given fields:
  13. func (_m *Asconn) Close() {
  14. _m.Called()
  15. }
  16. // Login provides a mock function with given fields: _a0
  17. func (_m *Asconn) Login(_a0 *aerospike.ClientPolicy) aerospike.Error {
  18. ret := _m.Called(_a0)
  19. var r0 aerospike.Error
  20. if rf, ok := ret.Get(0).(func(*aerospike.ClientPolicy) aerospike.Error); ok {
  21. r0 = rf(_a0)
  22. } else {
  23. if ret.Get(0) != nil {
  24. r0 = ret.Get(0).(aerospike.Error)
  25. }
  26. }
  27. return r0
  28. }
  29. // RequestInfo provides a mock function with given fields: _a0
  30. func (_m *Asconn) RequestInfo(_a0 ...string) (map[string]string, aerospike.Error) {
  31. _va := make([]any, len(_a0))
  32. for _i := range _a0 {
  33. _va[_i] = _a0[_i]
  34. }
  35. var _ca []any
  36. _ca = append(_ca, _va...)
  37. ret := _m.Called(_ca...)
  38. var r0 map[string]string
  39. if rf, ok := ret.Get(0).(func(...string) map[string]string); ok {
  40. r0 = rf(_a0...)
  41. } else {
  42. if ret.Get(0) != nil {
  43. r0 = ret.Get(0).(map[string]string)
  44. }
  45. }
  46. var r1 aerospike.Error
  47. if rf, ok := ret.Get(1).(func(...string) aerospike.Error); ok {
  48. r1 = rf(_a0...)
  49. } else {
  50. if ret.Get(1) != nil {
  51. r1 = ret.Get(1).(aerospike.Error)
  52. }
  53. }
  54. return r0, r1
  55. }
  56. // SetTimeout provides a mock function with given fields: _a0, _a1
  57. func (_m *Asconn) SetTimeout(_a0 time.Time, _a1 time.Duration) aerospike.Error {
  58. ret := _m.Called(_a0, _a1)
  59. var r0 aerospike.Error
  60. if rf, ok := ret.Get(0).(func(time.Time, time.Duration) aerospike.Error); ok {
  61. r0 = rf(_a0, _a1)
  62. } else {
  63. if ret.Get(0) != nil {
  64. r0 = ret.Get(0).(aerospike.Error)
  65. }
  66. }
  67. return r0
  68. }
  69. type mockConstructorTestingTNewAsconn interface {
  70. mock.TestingT
  71. Cleanup(func())
  72. }
  73. // NewAsconn creates a new instance of Asconn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  74. func NewAsconn(t mockConstructorTestingTNewAsconn) *Asconn {
  75. mock := &Asconn{}
  76. mock.Mock.Test(t)
  77. t.Cleanup(func() { mock.AssertExpectations(t) })
  78. return mock
  79. }