github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/m3ninx/search/search_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ../../search/types.go
     3  
     4  // Copyright (c) 2022 Uber Technologies, Inc.
     5  //
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction, including without limitation the rights
     9  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    10  // copies of the Software, and to permit persons to whom the Software is
    11  // furnished to do so, subject to the following conditions:
    12  //
    13  // The above copyright notice and this permission notice shall be included in
    14  // all copies or substantial portions of the Software.
    15  //
    16  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    19  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  // THE SOFTWARE.
    23  
    24  // Package search is a generated GoMock package.
    25  package search
    26  
    27  import (
    28  	"reflect"
    29  
    30  	"github.com/m3db/m3/src/m3ninx/doc"
    31  	"github.com/m3db/m3/src/m3ninx/generated/proto/querypb"
    32  	"github.com/m3db/m3/src/m3ninx/index"
    33  	"github.com/m3db/m3/src/m3ninx/postings"
    34  	"github.com/m3db/m3/src/x/context"
    35  
    36  	"github.com/golang/mock/gomock"
    37  )
    38  
    39  // MockExecutor is a mock of Executor interface.
    40  type MockExecutor struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockExecutorMockRecorder
    43  }
    44  
    45  // MockExecutorMockRecorder is the mock recorder for MockExecutor.
    46  type MockExecutorMockRecorder struct {
    47  	mock *MockExecutor
    48  }
    49  
    50  // NewMockExecutor creates a new mock instance.
    51  func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor {
    52  	mock := &MockExecutor{ctrl: ctrl}
    53  	mock.recorder = &MockExecutorMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockExecutor) EXPECT() *MockExecutorMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // Close mocks base method.
    63  func (m *MockExecutor) Close() error {
    64  	m.ctrl.T.Helper()
    65  	ret := m.ctrl.Call(m, "Close")
    66  	ret0, _ := ret[0].(error)
    67  	return ret0
    68  }
    69  
    70  // Close indicates an expected call of Close.
    71  func (mr *MockExecutorMockRecorder) Close() *gomock.Call {
    72  	mr.mock.ctrl.T.Helper()
    73  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockExecutor)(nil).Close))
    74  }
    75  
    76  // Execute mocks base method.
    77  func (m *MockExecutor) Execute(ctx context.Context, q Query) (doc.QueryDocIterator, error) {
    78  	m.ctrl.T.Helper()
    79  	ret := m.ctrl.Call(m, "Execute", ctx, q)
    80  	ret0, _ := ret[0].(doc.QueryDocIterator)
    81  	ret1, _ := ret[1].(error)
    82  	return ret0, ret1
    83  }
    84  
    85  // Execute indicates an expected call of Execute.
    86  func (mr *MockExecutorMockRecorder) Execute(ctx, q interface{}) *gomock.Call {
    87  	mr.mock.ctrl.T.Helper()
    88  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockExecutor)(nil).Execute), ctx, q)
    89  }
    90  
    91  // MockQuery is a mock of Query interface.
    92  type MockQuery struct {
    93  	ctrl     *gomock.Controller
    94  	recorder *MockQueryMockRecorder
    95  }
    96  
    97  // MockQueryMockRecorder is the mock recorder for MockQuery.
    98  type MockQueryMockRecorder struct {
    99  	mock *MockQuery
   100  }
   101  
   102  // NewMockQuery creates a new mock instance.
   103  func NewMockQuery(ctrl *gomock.Controller) *MockQuery {
   104  	mock := &MockQuery{ctrl: ctrl}
   105  	mock.recorder = &MockQueryMockRecorder{mock}
   106  	return mock
   107  }
   108  
   109  // EXPECT returns an object that allows the caller to indicate expected use.
   110  func (m *MockQuery) EXPECT() *MockQueryMockRecorder {
   111  	return m.recorder
   112  }
   113  
   114  // Equal mocks base method.
   115  func (m *MockQuery) Equal(q Query) bool {
   116  	m.ctrl.T.Helper()
   117  	ret := m.ctrl.Call(m, "Equal", q)
   118  	ret0, _ := ret[0].(bool)
   119  	return ret0
   120  }
   121  
   122  // Equal indicates an expected call of Equal.
   123  func (mr *MockQueryMockRecorder) Equal(q interface{}) *gomock.Call {
   124  	mr.mock.ctrl.T.Helper()
   125  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Equal", reflect.TypeOf((*MockQuery)(nil).Equal), q)
   126  }
   127  
   128  // Searcher mocks base method.
   129  func (m *MockQuery) Searcher() (Searcher, error) {
   130  	m.ctrl.T.Helper()
   131  	ret := m.ctrl.Call(m, "Searcher")
   132  	ret0, _ := ret[0].(Searcher)
   133  	ret1, _ := ret[1].(error)
   134  	return ret0, ret1
   135  }
   136  
   137  // Searcher indicates an expected call of Searcher.
   138  func (mr *MockQueryMockRecorder) Searcher() *gomock.Call {
   139  	mr.mock.ctrl.T.Helper()
   140  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Searcher", reflect.TypeOf((*MockQuery)(nil).Searcher))
   141  }
   142  
   143  // String mocks base method.
   144  func (m *MockQuery) String() string {
   145  	m.ctrl.T.Helper()
   146  	ret := m.ctrl.Call(m, "String")
   147  	ret0, _ := ret[0].(string)
   148  	return ret0
   149  }
   150  
   151  // String indicates an expected call of String.
   152  func (mr *MockQueryMockRecorder) String() *gomock.Call {
   153  	mr.mock.ctrl.T.Helper()
   154  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockQuery)(nil).String))
   155  }
   156  
   157  // ToProto mocks base method.
   158  func (m *MockQuery) ToProto() *querypb.Query {
   159  	m.ctrl.T.Helper()
   160  	ret := m.ctrl.Call(m, "ToProto")
   161  	ret0, _ := ret[0].(*querypb.Query)
   162  	return ret0
   163  }
   164  
   165  // ToProto indicates an expected call of ToProto.
   166  func (mr *MockQueryMockRecorder) ToProto() *gomock.Call {
   167  	mr.mock.ctrl.T.Helper()
   168  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToProto", reflect.TypeOf((*MockQuery)(nil).ToProto))
   169  }
   170  
   171  // MockSearcher is a mock of Searcher interface.
   172  type MockSearcher struct {
   173  	ctrl     *gomock.Controller
   174  	recorder *MockSearcherMockRecorder
   175  }
   176  
   177  // MockSearcherMockRecorder is the mock recorder for MockSearcher.
   178  type MockSearcherMockRecorder struct {
   179  	mock *MockSearcher
   180  }
   181  
   182  // NewMockSearcher creates a new mock instance.
   183  func NewMockSearcher(ctrl *gomock.Controller) *MockSearcher {
   184  	mock := &MockSearcher{ctrl: ctrl}
   185  	mock.recorder = &MockSearcherMockRecorder{mock}
   186  	return mock
   187  }
   188  
   189  // EXPECT returns an object that allows the caller to indicate expected use.
   190  func (m *MockSearcher) EXPECT() *MockSearcherMockRecorder {
   191  	return m.recorder
   192  }
   193  
   194  // Search mocks base method.
   195  func (m *MockSearcher) Search(arg0 index.Reader) (postings.List, error) {
   196  	m.ctrl.T.Helper()
   197  	ret := m.ctrl.Call(m, "Search", arg0)
   198  	ret0, _ := ret[0].(postings.List)
   199  	ret1, _ := ret[1].(error)
   200  	return ret0, ret1
   201  }
   202  
   203  // Search indicates an expected call of Search.
   204  func (mr *MockSearcherMockRecorder) Search(arg0 interface{}) *gomock.Call {
   205  	mr.mock.ctrl.T.Helper()
   206  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockSearcher)(nil).Search), arg0)
   207  }
   208  
   209  // MockReadThroughSegmentSearcher is a mock of ReadThroughSegmentSearcher interface.
   210  type MockReadThroughSegmentSearcher struct {
   211  	ctrl     *gomock.Controller
   212  	recorder *MockReadThroughSegmentSearcherMockRecorder
   213  }
   214  
   215  // MockReadThroughSegmentSearcherMockRecorder is the mock recorder for MockReadThroughSegmentSearcher.
   216  type MockReadThroughSegmentSearcherMockRecorder struct {
   217  	mock *MockReadThroughSegmentSearcher
   218  }
   219  
   220  // NewMockReadThroughSegmentSearcher creates a new mock instance.
   221  func NewMockReadThroughSegmentSearcher(ctrl *gomock.Controller) *MockReadThroughSegmentSearcher {
   222  	mock := &MockReadThroughSegmentSearcher{ctrl: ctrl}
   223  	mock.recorder = &MockReadThroughSegmentSearcherMockRecorder{mock}
   224  	return mock
   225  }
   226  
   227  // EXPECT returns an object that allows the caller to indicate expected use.
   228  func (m *MockReadThroughSegmentSearcher) EXPECT() *MockReadThroughSegmentSearcherMockRecorder {
   229  	return m.recorder
   230  }
   231  
   232  // Search mocks base method.
   233  func (m *MockReadThroughSegmentSearcher) Search(query Query, searcher Searcher) (postings.List, error) {
   234  	m.ctrl.T.Helper()
   235  	ret := m.ctrl.Call(m, "Search", query, searcher)
   236  	ret0, _ := ret[0].(postings.List)
   237  	ret1, _ := ret[1].(error)
   238  	return ret0, ret1
   239  }
   240  
   241  // Search indicates an expected call of Search.
   242  func (mr *MockReadThroughSegmentSearcherMockRecorder) Search(query, searcher interface{}) *gomock.Call {
   243  	mr.mock.ctrl.T.Helper()
   244  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockReadThroughSegmentSearcher)(nil).Search), query, searcher)
   245  }