go.temporal.io/server@v1.23.0/common/archiver/history_iterator_mock.go (about)

     1  // The MIT License
     2  //
     3  // Copyright (c) 2020 Temporal Technologies Inc.  All rights reserved.
     4  //
     5  // Copyright (c) 2020 Uber Technologies, Inc.
     6  //
     7  // Permission is hereby granted, free of charge, to any person obtaining a copy
     8  // of this software and associated documentation files (the "Software"), to deal
     9  // in the Software without restriction, including without limitation the rights
    10  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    11  // copies of the Software, and to permit persons to whom the Software is
    12  // furnished to do so, subject to the following conditions:
    13  //
    14  // The above copyright notice and this permission notice shall be included in
    15  // all copies or substantial portions of the Software.
    16  //
    17  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    18  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    19  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    20  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    21  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    22  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    23  // THE SOFTWARE.
    24  
    25  // Code generated by MockGen. DO NOT EDIT.
    26  // Source: history_iterator.go
    27  
    28  // Package archiver is a generated GoMock package.
    29  package archiver
    30  
    31  import (
    32  	context "context"
    33  	reflect "reflect"
    34  
    35  	gomock "github.com/golang/mock/gomock"
    36  	archiver "go.temporal.io/server/api/archiver/v1"
    37  )
    38  
    39  // MockHistoryIterator is a mock of HistoryIterator interface.
    40  type MockHistoryIterator struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockHistoryIteratorMockRecorder
    43  }
    44  
    45  // MockHistoryIteratorMockRecorder is the mock recorder for MockHistoryIterator.
    46  type MockHistoryIteratorMockRecorder struct {
    47  	mock *MockHistoryIterator
    48  }
    49  
    50  // NewMockHistoryIterator creates a new mock instance.
    51  func NewMockHistoryIterator(ctrl *gomock.Controller) *MockHistoryIterator {
    52  	mock := &MockHistoryIterator{ctrl: ctrl}
    53  	mock.recorder = &MockHistoryIteratorMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockHistoryIterator) EXPECT() *MockHistoryIteratorMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // GetState mocks base method.
    63  func (m *MockHistoryIterator) GetState() ([]byte, error) {
    64  	m.ctrl.T.Helper()
    65  	ret := m.ctrl.Call(m, "GetState")
    66  	ret0, _ := ret[0].([]byte)
    67  	ret1, _ := ret[1].(error)
    68  	return ret0, ret1
    69  }
    70  
    71  // GetState indicates an expected call of GetState.
    72  func (mr *MockHistoryIteratorMockRecorder) GetState() *gomock.Call {
    73  	mr.mock.ctrl.T.Helper()
    74  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetState", reflect.TypeOf((*MockHistoryIterator)(nil).GetState))
    75  }
    76  
    77  // HasNext mocks base method.
    78  func (m *MockHistoryIterator) HasNext() bool {
    79  	m.ctrl.T.Helper()
    80  	ret := m.ctrl.Call(m, "HasNext")
    81  	ret0, _ := ret[0].(bool)
    82  	return ret0
    83  }
    84  
    85  // HasNext indicates an expected call of HasNext.
    86  func (mr *MockHistoryIteratorMockRecorder) HasNext() *gomock.Call {
    87  	mr.mock.ctrl.T.Helper()
    88  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasNext", reflect.TypeOf((*MockHistoryIterator)(nil).HasNext))
    89  }
    90  
    91  // Next mocks base method.
    92  func (m *MockHistoryIterator) Next(arg0 context.Context) (*archiver.HistoryBlob, error) {
    93  	m.ctrl.T.Helper()
    94  	ret := m.ctrl.Call(m, "Next", arg0)
    95  	ret0, _ := ret[0].(*archiver.HistoryBlob)
    96  	ret1, _ := ret[1].(error)
    97  	return ret0, ret1
    98  }
    99  
   100  // Next indicates an expected call of Next.
   101  func (mr *MockHistoryIteratorMockRecorder) Next(arg0 interface{}) *gomock.Call {
   102  	mr.mock.ctrl.T.Helper()
   103  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockHistoryIterator)(nil).Next), arg0)
   104  }
   105  
   106  // MockSizeEstimator is a mock of SizeEstimator interface.
   107  type MockSizeEstimator struct {
   108  	ctrl     *gomock.Controller
   109  	recorder *MockSizeEstimatorMockRecorder
   110  }
   111  
   112  // MockSizeEstimatorMockRecorder is the mock recorder for MockSizeEstimator.
   113  type MockSizeEstimatorMockRecorder struct {
   114  	mock *MockSizeEstimator
   115  }
   116  
   117  // NewMockSizeEstimator creates a new mock instance.
   118  func NewMockSizeEstimator(ctrl *gomock.Controller) *MockSizeEstimator {
   119  	mock := &MockSizeEstimator{ctrl: ctrl}
   120  	mock.recorder = &MockSizeEstimatorMockRecorder{mock}
   121  	return mock
   122  }
   123  
   124  // EXPECT returns an object that allows the caller to indicate expected use.
   125  func (m *MockSizeEstimator) EXPECT() *MockSizeEstimatorMockRecorder {
   126  	return m.recorder
   127  }
   128  
   129  // EstimateSize mocks base method.
   130  func (m *MockSizeEstimator) EstimateSize(v interface{}) (int, error) {
   131  	m.ctrl.T.Helper()
   132  	ret := m.ctrl.Call(m, "EstimateSize", v)
   133  	ret0, _ := ret[0].(int)
   134  	ret1, _ := ret[1].(error)
   135  	return ret0, ret1
   136  }
   137  
   138  // EstimateSize indicates an expected call of EstimateSize.
   139  func (mr *MockSizeEstimatorMockRecorder) EstimateSize(v interface{}) *gomock.Call {
   140  	mr.mock.ctrl.T.Helper()
   141  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimateSize", reflect.TypeOf((*MockSizeEstimator)(nil).EstimateSize), v)
   142  }