collection_mock.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: collection.go
  3. // Package internal is a generated GoMock package.
  4. package internal
  5. import (
  6. mgo "github.com/globalsign/mgo"
  7. gomock "github.com/golang/mock/gomock"
  8. reflect "reflect"
  9. )
  10. // MockMgoCollection is a mock of MgoCollection interface
  11. type MockMgoCollection struct {
  12. ctrl *gomock.Controller
  13. recorder *MockMgoCollectionMockRecorder
  14. }
  15. // MockMgoCollectionMockRecorder is the mock recorder for MockMgoCollection
  16. type MockMgoCollectionMockRecorder struct {
  17. mock *MockMgoCollection
  18. }
  19. // NewMockMgoCollection creates a new mock instance
  20. func NewMockMgoCollection(ctrl *gomock.Controller) *MockMgoCollection {
  21. mock := &MockMgoCollection{ctrl: ctrl}
  22. mock.recorder = &MockMgoCollectionMockRecorder{mock}
  23. return mock
  24. }
  25. // EXPECT returns an object that allows the caller to indicate expected use
  26. func (m *MockMgoCollection) EXPECT() *MockMgoCollectionMockRecorder {
  27. return m.recorder
  28. }
  29. // Find mocks base method
  30. func (m *MockMgoCollection) Find(query interface{}) *mgo.Query {
  31. m.ctrl.T.Helper()
  32. ret := m.ctrl.Call(m, "Find", query)
  33. ret0, _ := ret[0].(*mgo.Query)
  34. return ret0
  35. }
  36. // Find indicates an expected call of Find
  37. func (mr *MockMgoCollectionMockRecorder) Find(query interface{}) *gomock.Call {
  38. mr.mock.ctrl.T.Helper()
  39. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockMgoCollection)(nil).Find), query)
  40. }
  41. // FindId mocks base method
  42. func (m *MockMgoCollection) FindId(id interface{}) *mgo.Query {
  43. m.ctrl.T.Helper()
  44. ret := m.ctrl.Call(m, "FindId", id)
  45. ret0, _ := ret[0].(*mgo.Query)
  46. return ret0
  47. }
  48. // FindId indicates an expected call of FindId
  49. func (mr *MockMgoCollectionMockRecorder) FindId(id interface{}) *gomock.Call {
  50. mr.mock.ctrl.T.Helper()
  51. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindId", reflect.TypeOf((*MockMgoCollection)(nil).FindId), id)
  52. }
  53. // Insert mocks base method
  54. func (m *MockMgoCollection) Insert(docs ...interface{}) error {
  55. m.ctrl.T.Helper()
  56. varargs := []interface{}{}
  57. for _, a := range docs {
  58. varargs = append(varargs, a)
  59. }
  60. ret := m.ctrl.Call(m, "Insert", varargs...)
  61. ret0, _ := ret[0].(error)
  62. return ret0
  63. }
  64. // Insert indicates an expected call of Insert
  65. func (mr *MockMgoCollectionMockRecorder) Insert(docs ...interface{}) *gomock.Call {
  66. mr.mock.ctrl.T.Helper()
  67. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockMgoCollection)(nil).Insert), docs...)
  68. }
  69. // Pipe mocks base method
  70. func (m *MockMgoCollection) Pipe(pipeline interface{}) *mgo.Pipe {
  71. m.ctrl.T.Helper()
  72. ret := m.ctrl.Call(m, "Pipe", pipeline)
  73. ret0, _ := ret[0].(*mgo.Pipe)
  74. return ret0
  75. }
  76. // Pipe indicates an expected call of Pipe
  77. func (mr *MockMgoCollectionMockRecorder) Pipe(pipeline interface{}) *gomock.Call {
  78. mr.mock.ctrl.T.Helper()
  79. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pipe", reflect.TypeOf((*MockMgoCollection)(nil).Pipe), pipeline)
  80. }
  81. // Remove mocks base method
  82. func (m *MockMgoCollection) Remove(selector interface{}) error {
  83. m.ctrl.T.Helper()
  84. ret := m.ctrl.Call(m, "Remove", selector)
  85. ret0, _ := ret[0].(error)
  86. return ret0
  87. }
  88. // Remove indicates an expected call of Remove
  89. func (mr *MockMgoCollectionMockRecorder) Remove(selector interface{}) *gomock.Call {
  90. mr.mock.ctrl.T.Helper()
  91. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockMgoCollection)(nil).Remove), selector)
  92. }
  93. // RemoveAll mocks base method
  94. func (m *MockMgoCollection) RemoveAll(selector interface{}) (*mgo.ChangeInfo, error) {
  95. m.ctrl.T.Helper()
  96. ret := m.ctrl.Call(m, "RemoveAll", selector)
  97. ret0, _ := ret[0].(*mgo.ChangeInfo)
  98. ret1, _ := ret[1].(error)
  99. return ret0, ret1
  100. }
  101. // RemoveAll indicates an expected call of RemoveAll
  102. func (mr *MockMgoCollectionMockRecorder) RemoveAll(selector interface{}) *gomock.Call {
  103. mr.mock.ctrl.T.Helper()
  104. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockMgoCollection)(nil).RemoveAll), selector)
  105. }
  106. // RemoveId mocks base method
  107. func (m *MockMgoCollection) RemoveId(id interface{}) error {
  108. m.ctrl.T.Helper()
  109. ret := m.ctrl.Call(m, "RemoveId", id)
  110. ret0, _ := ret[0].(error)
  111. return ret0
  112. }
  113. // RemoveId indicates an expected call of RemoveId
  114. func (mr *MockMgoCollectionMockRecorder) RemoveId(id interface{}) *gomock.Call {
  115. mr.mock.ctrl.T.Helper()
  116. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveId", reflect.TypeOf((*MockMgoCollection)(nil).RemoveId), id)
  117. }
  118. // Update mocks base method
  119. func (m *MockMgoCollection) Update(selector, update interface{}) error {
  120. m.ctrl.T.Helper()
  121. ret := m.ctrl.Call(m, "Update", selector, update)
  122. ret0, _ := ret[0].(error)
  123. return ret0
  124. }
  125. // Update indicates an expected call of Update
  126. func (mr *MockMgoCollectionMockRecorder) Update(selector, update interface{}) *gomock.Call {
  127. mr.mock.ctrl.T.Helper()
  128. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockMgoCollection)(nil).Update), selector, update)
  129. }
  130. // UpdateId mocks base method
  131. func (m *MockMgoCollection) UpdateId(id, update interface{}) error {
  132. m.ctrl.T.Helper()
  133. ret := m.ctrl.Call(m, "UpdateId", id, update)
  134. ret0, _ := ret[0].(error)
  135. return ret0
  136. }
  137. // UpdateId indicates an expected call of UpdateId
  138. func (mr *MockMgoCollectionMockRecorder) UpdateId(id, update interface{}) *gomock.Call {
  139. mr.mock.ctrl.T.Helper()
  140. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateId", reflect.TypeOf((*MockMgoCollection)(nil).UpdateId), id, update)
  141. }
  142. // Upsert mocks base method
  143. func (m *MockMgoCollection) Upsert(selector, update interface{}) (*mgo.ChangeInfo, error) {
  144. m.ctrl.T.Helper()
  145. ret := m.ctrl.Call(m, "Upsert", selector, update)
  146. ret0, _ := ret[0].(*mgo.ChangeInfo)
  147. ret1, _ := ret[1].(error)
  148. return ret0, ret1
  149. }
  150. // Upsert indicates an expected call of Upsert
  151. func (mr *MockMgoCollectionMockRecorder) Upsert(selector, update interface{}) *gomock.Call {
  152. mr.mock.ctrl.T.Helper()
  153. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upsert", reflect.TypeOf((*MockMgoCollection)(nil).Upsert), selector, update)
  154. }