github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/m3ninx/index/segment/fst/fst_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/m3db/m3/src/m3ninx/index/segment/fst (interfaces: Writer,Segment)
     3  
     4  // Copyright (c) 2021 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 fst is a generated GoMock package.
    25  package fst
    26  
    27  import (
    28  	"io"
    29  	"reflect"
    30  
    31  	"github.com/m3db/m3/src/m3ninx/index/segment"
    32  	"github.com/m3db/m3/src/x/context"
    33  
    34  	"github.com/golang/mock/gomock"
    35  )
    36  
    37  // MockWriter is a mock of Writer interface.
    38  type MockWriter struct {
    39  	ctrl     *gomock.Controller
    40  	recorder *MockWriterMockRecorder
    41  }
    42  
    43  // MockWriterMockRecorder is the mock recorder for MockWriter.
    44  type MockWriterMockRecorder struct {
    45  	mock *MockWriter
    46  }
    47  
    48  // NewMockWriter creates a new mock instance.
    49  func NewMockWriter(ctrl *gomock.Controller) *MockWriter {
    50  	mock := &MockWriter{ctrl: ctrl}
    51  	mock.recorder = &MockWriterMockRecorder{mock}
    52  	return mock
    53  }
    54  
    55  // EXPECT returns an object that allows the caller to indicate expected use.
    56  func (m *MockWriter) EXPECT() *MockWriterMockRecorder {
    57  	return m.recorder
    58  }
    59  
    60  // MajorVersion mocks base method.
    61  func (m *MockWriter) MajorVersion() int {
    62  	m.ctrl.T.Helper()
    63  	ret := m.ctrl.Call(m, "MajorVersion")
    64  	ret0, _ := ret[0].(int)
    65  	return ret0
    66  }
    67  
    68  // MajorVersion indicates an expected call of MajorVersion.
    69  func (mr *MockWriterMockRecorder) MajorVersion() *gomock.Call {
    70  	mr.mock.ctrl.T.Helper()
    71  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MajorVersion", reflect.TypeOf((*MockWriter)(nil).MajorVersion))
    72  }
    73  
    74  // Metadata mocks base method.
    75  func (m *MockWriter) Metadata() []byte {
    76  	m.ctrl.T.Helper()
    77  	ret := m.ctrl.Call(m, "Metadata")
    78  	ret0, _ := ret[0].([]byte)
    79  	return ret0
    80  }
    81  
    82  // Metadata indicates an expected call of Metadata.
    83  func (mr *MockWriterMockRecorder) Metadata() *gomock.Call {
    84  	mr.mock.ctrl.T.Helper()
    85  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metadata", reflect.TypeOf((*MockWriter)(nil).Metadata))
    86  }
    87  
    88  // MinorVersion mocks base method.
    89  func (m *MockWriter) MinorVersion() int {
    90  	m.ctrl.T.Helper()
    91  	ret := m.ctrl.Call(m, "MinorVersion")
    92  	ret0, _ := ret[0].(int)
    93  	return ret0
    94  }
    95  
    96  // MinorVersion indicates an expected call of MinorVersion.
    97  func (mr *MockWriterMockRecorder) MinorVersion() *gomock.Call {
    98  	mr.mock.ctrl.T.Helper()
    99  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MinorVersion", reflect.TypeOf((*MockWriter)(nil).MinorVersion))
   100  }
   101  
   102  // Reset mocks base method.
   103  func (m *MockWriter) Reset(arg0 segment.Builder) error {
   104  	m.ctrl.T.Helper()
   105  	ret := m.ctrl.Call(m, "Reset", arg0)
   106  	ret0, _ := ret[0].(error)
   107  	return ret0
   108  }
   109  
   110  // Reset indicates an expected call of Reset.
   111  func (mr *MockWriterMockRecorder) Reset(arg0 interface{}) *gomock.Call {
   112  	mr.mock.ctrl.T.Helper()
   113  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockWriter)(nil).Reset), arg0)
   114  }
   115  
   116  // WriteDocumentsData mocks base method.
   117  func (m *MockWriter) WriteDocumentsData(arg0 io.Writer) error {
   118  	m.ctrl.T.Helper()
   119  	ret := m.ctrl.Call(m, "WriteDocumentsData", arg0)
   120  	ret0, _ := ret[0].(error)
   121  	return ret0
   122  }
   123  
   124  // WriteDocumentsData indicates an expected call of WriteDocumentsData.
   125  func (mr *MockWriterMockRecorder) WriteDocumentsData(arg0 interface{}) *gomock.Call {
   126  	mr.mock.ctrl.T.Helper()
   127  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDocumentsData", reflect.TypeOf((*MockWriter)(nil).WriteDocumentsData), arg0)
   128  }
   129  
   130  // WriteDocumentsIndex mocks base method.
   131  func (m *MockWriter) WriteDocumentsIndex(arg0 io.Writer) error {
   132  	m.ctrl.T.Helper()
   133  	ret := m.ctrl.Call(m, "WriteDocumentsIndex", arg0)
   134  	ret0, _ := ret[0].(error)
   135  	return ret0
   136  }
   137  
   138  // WriteDocumentsIndex indicates an expected call of WriteDocumentsIndex.
   139  func (mr *MockWriterMockRecorder) WriteDocumentsIndex(arg0 interface{}) *gomock.Call {
   140  	mr.mock.ctrl.T.Helper()
   141  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDocumentsIndex", reflect.TypeOf((*MockWriter)(nil).WriteDocumentsIndex), arg0)
   142  }
   143  
   144  // WriteFSTFields mocks base method.
   145  func (m *MockWriter) WriteFSTFields(arg0 io.Writer) error {
   146  	m.ctrl.T.Helper()
   147  	ret := m.ctrl.Call(m, "WriteFSTFields", arg0)
   148  	ret0, _ := ret[0].(error)
   149  	return ret0
   150  }
   151  
   152  // WriteFSTFields indicates an expected call of WriteFSTFields.
   153  func (mr *MockWriterMockRecorder) WriteFSTFields(arg0 interface{}) *gomock.Call {
   154  	mr.mock.ctrl.T.Helper()
   155  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFSTFields", reflect.TypeOf((*MockWriter)(nil).WriteFSTFields), arg0)
   156  }
   157  
   158  // WriteFSTTerms mocks base method.
   159  func (m *MockWriter) WriteFSTTerms(arg0 io.Writer) error {
   160  	m.ctrl.T.Helper()
   161  	ret := m.ctrl.Call(m, "WriteFSTTerms", arg0)
   162  	ret0, _ := ret[0].(error)
   163  	return ret0
   164  }
   165  
   166  // WriteFSTTerms indicates an expected call of WriteFSTTerms.
   167  func (mr *MockWriterMockRecorder) WriteFSTTerms(arg0 interface{}) *gomock.Call {
   168  	mr.mock.ctrl.T.Helper()
   169  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFSTTerms", reflect.TypeOf((*MockWriter)(nil).WriteFSTTerms), arg0)
   170  }
   171  
   172  // WritePostingsOffsets mocks base method.
   173  func (m *MockWriter) WritePostingsOffsets(arg0 io.Writer) error {
   174  	m.ctrl.T.Helper()
   175  	ret := m.ctrl.Call(m, "WritePostingsOffsets", arg0)
   176  	ret0, _ := ret[0].(error)
   177  	return ret0
   178  }
   179  
   180  // WritePostingsOffsets indicates an expected call of WritePostingsOffsets.
   181  func (mr *MockWriterMockRecorder) WritePostingsOffsets(arg0 interface{}) *gomock.Call {
   182  	mr.mock.ctrl.T.Helper()
   183  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritePostingsOffsets", reflect.TypeOf((*MockWriter)(nil).WritePostingsOffsets), arg0)
   184  }
   185  
   186  // MockSegment is a mock of Segment interface.
   187  type MockSegment struct {
   188  	ctrl     *gomock.Controller
   189  	recorder *MockSegmentMockRecorder
   190  }
   191  
   192  // MockSegmentMockRecorder is the mock recorder for MockSegment.
   193  type MockSegmentMockRecorder struct {
   194  	mock *MockSegment
   195  }
   196  
   197  // NewMockSegment creates a new mock instance.
   198  func NewMockSegment(ctrl *gomock.Controller) *MockSegment {
   199  	mock := &MockSegment{ctrl: ctrl}
   200  	mock.recorder = &MockSegmentMockRecorder{mock}
   201  	return mock
   202  }
   203  
   204  // EXPECT returns an object that allows the caller to indicate expected use.
   205  func (m *MockSegment) EXPECT() *MockSegmentMockRecorder {
   206  	return m.recorder
   207  }
   208  
   209  // Close mocks base method.
   210  func (m *MockSegment) Close() error {
   211  	m.ctrl.T.Helper()
   212  	ret := m.ctrl.Call(m, "Close")
   213  	ret0, _ := ret[0].(error)
   214  	return ret0
   215  }
   216  
   217  // Close indicates an expected call of Close.
   218  func (mr *MockSegmentMockRecorder) Close() *gomock.Call {
   219  	mr.mock.ctrl.T.Helper()
   220  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSegment)(nil).Close))
   221  }
   222  
   223  // ContainsField mocks base method.
   224  func (m *MockSegment) ContainsField(arg0 []byte) (bool, error) {
   225  	m.ctrl.T.Helper()
   226  	ret := m.ctrl.Call(m, "ContainsField", arg0)
   227  	ret0, _ := ret[0].(bool)
   228  	ret1, _ := ret[1].(error)
   229  	return ret0, ret1
   230  }
   231  
   232  // ContainsField indicates an expected call of ContainsField.
   233  func (mr *MockSegmentMockRecorder) ContainsField(arg0 interface{}) *gomock.Call {
   234  	mr.mock.ctrl.T.Helper()
   235  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsField", reflect.TypeOf((*MockSegment)(nil).ContainsField), arg0)
   236  }
   237  
   238  // ContainsID mocks base method.
   239  func (m *MockSegment) ContainsID(arg0 []byte) (bool, error) {
   240  	m.ctrl.T.Helper()
   241  	ret := m.ctrl.Call(m, "ContainsID", arg0)
   242  	ret0, _ := ret[0].(bool)
   243  	ret1, _ := ret[1].(error)
   244  	return ret0, ret1
   245  }
   246  
   247  // ContainsID indicates an expected call of ContainsID.
   248  func (mr *MockSegmentMockRecorder) ContainsID(arg0 interface{}) *gomock.Call {
   249  	mr.mock.ctrl.T.Helper()
   250  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsID", reflect.TypeOf((*MockSegment)(nil).ContainsID), arg0)
   251  }
   252  
   253  // FieldsIterable mocks base method.
   254  func (m *MockSegment) FieldsIterable() segment.FieldsIterable {
   255  	m.ctrl.T.Helper()
   256  	ret := m.ctrl.Call(m, "FieldsIterable")
   257  	ret0, _ := ret[0].(segment.FieldsIterable)
   258  	return ret0
   259  }
   260  
   261  // FieldsIterable indicates an expected call of FieldsIterable.
   262  func (mr *MockSegmentMockRecorder) FieldsIterable() *gomock.Call {
   263  	mr.mock.ctrl.T.Helper()
   264  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FieldsIterable", reflect.TypeOf((*MockSegment)(nil).FieldsIterable))
   265  }
   266  
   267  // FreeMmap mocks base method.
   268  func (m *MockSegment) FreeMmap() error {
   269  	m.ctrl.T.Helper()
   270  	ret := m.ctrl.Call(m, "FreeMmap")
   271  	ret0, _ := ret[0].(error)
   272  	return ret0
   273  }
   274  
   275  // FreeMmap indicates an expected call of FreeMmap.
   276  func (mr *MockSegmentMockRecorder) FreeMmap() *gomock.Call {
   277  	mr.mock.ctrl.T.Helper()
   278  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FreeMmap", reflect.TypeOf((*MockSegment)(nil).FreeMmap))
   279  }
   280  
   281  // Reader mocks base method.
   282  func (m *MockSegment) Reader() (segment.Reader, error) {
   283  	m.ctrl.T.Helper()
   284  	ret := m.ctrl.Call(m, "Reader")
   285  	ret0, _ := ret[0].(segment.Reader)
   286  	ret1, _ := ret[1].(error)
   287  	return ret0, ret1
   288  }
   289  
   290  // Reader indicates an expected call of Reader.
   291  func (mr *MockSegmentMockRecorder) Reader() *gomock.Call {
   292  	mr.mock.ctrl.T.Helper()
   293  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockSegment)(nil).Reader))
   294  }
   295  
   296  // SegmentData mocks base method.
   297  func (m *MockSegment) SegmentData(arg0 context.Context) (SegmentData, error) {
   298  	m.ctrl.T.Helper()
   299  	ret := m.ctrl.Call(m, "SegmentData", arg0)
   300  	ret0, _ := ret[0].(SegmentData)
   301  	ret1, _ := ret[1].(error)
   302  	return ret0, ret1
   303  }
   304  
   305  // SegmentData indicates an expected call of SegmentData.
   306  func (mr *MockSegmentMockRecorder) SegmentData(arg0 interface{}) *gomock.Call {
   307  	mr.mock.ctrl.T.Helper()
   308  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SegmentData", reflect.TypeOf((*MockSegment)(nil).SegmentData), arg0)
   309  }
   310  
   311  // Size mocks base method.
   312  func (m *MockSegment) Size() int64 {
   313  	m.ctrl.T.Helper()
   314  	ret := m.ctrl.Call(m, "Size")
   315  	ret0, _ := ret[0].(int64)
   316  	return ret0
   317  }
   318  
   319  // Size indicates an expected call of Size.
   320  func (mr *MockSegmentMockRecorder) Size() *gomock.Call {
   321  	mr.mock.ctrl.T.Helper()
   322  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Size", reflect.TypeOf((*MockSegment)(nil).Size))
   323  }
   324  
   325  // TermsIterable mocks base method.
   326  func (m *MockSegment) TermsIterable() segment.TermsIterable {
   327  	m.ctrl.T.Helper()
   328  	ret := m.ctrl.Call(m, "TermsIterable")
   329  	ret0, _ := ret[0].(segment.TermsIterable)
   330  	return ret0
   331  }
   332  
   333  // TermsIterable indicates an expected call of TermsIterable.
   334  func (mr *MockSegmentMockRecorder) TermsIterable() *gomock.Call {
   335  	mr.mock.ctrl.T.Helper()
   336  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TermsIterable", reflect.TypeOf((*MockSegment)(nil).TermsIterable))
   337  }