go.temporal.io/server@v1.23.0/common/archiver/interface_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: interface.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 v1 "go.temporal.io/server/api/archiver/v1" 37 searchattribute "go.temporal.io/server/common/searchattribute" 38 ) 39 40 // MockHistoryArchiver is a mock of HistoryArchiver interface. 41 type MockHistoryArchiver struct { 42 ctrl *gomock.Controller 43 recorder *MockHistoryArchiverMockRecorder 44 } 45 46 // MockHistoryArchiverMockRecorder is the mock recorder for MockHistoryArchiver. 47 type MockHistoryArchiverMockRecorder struct { 48 mock *MockHistoryArchiver 49 } 50 51 // NewMockHistoryArchiver creates a new mock instance. 52 func NewMockHistoryArchiver(ctrl *gomock.Controller) *MockHistoryArchiver { 53 mock := &MockHistoryArchiver{ctrl: ctrl} 54 mock.recorder = &MockHistoryArchiverMockRecorder{mock} 55 return mock 56 } 57 58 // EXPECT returns an object that allows the caller to indicate expected use. 59 func (m *MockHistoryArchiver) EXPECT() *MockHistoryArchiverMockRecorder { 60 return m.recorder 61 } 62 63 // Archive mocks base method. 64 func (m *MockHistoryArchiver) Archive(ctx context.Context, uri URI, request *ArchiveHistoryRequest, opts ...ArchiveOption) error { 65 m.ctrl.T.Helper() 66 varargs := []interface{}{ctx, uri, request} 67 for _, a := range opts { 68 varargs = append(varargs, a) 69 } 70 ret := m.ctrl.Call(m, "Archive", varargs...) 71 ret0, _ := ret[0].(error) 72 return ret0 73 } 74 75 // Archive indicates an expected call of Archive. 76 func (mr *MockHistoryArchiverMockRecorder) Archive(ctx, uri, request interface{}, opts ...interface{}) *gomock.Call { 77 mr.mock.ctrl.T.Helper() 78 varargs := append([]interface{}{ctx, uri, request}, opts...) 79 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Archive", reflect.TypeOf((*MockHistoryArchiver)(nil).Archive), varargs...) 80 } 81 82 // Get mocks base method. 83 func (m *MockHistoryArchiver) Get(ctx context.Context, url URI, request *GetHistoryRequest) (*GetHistoryResponse, error) { 84 m.ctrl.T.Helper() 85 ret := m.ctrl.Call(m, "Get", ctx, url, request) 86 ret0, _ := ret[0].(*GetHistoryResponse) 87 ret1, _ := ret[1].(error) 88 return ret0, ret1 89 } 90 91 // Get indicates an expected call of Get. 92 func (mr *MockHistoryArchiverMockRecorder) Get(ctx, url, request interface{}) *gomock.Call { 93 mr.mock.ctrl.T.Helper() 94 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockHistoryArchiver)(nil).Get), ctx, url, request) 95 } 96 97 // ValidateURI mocks base method. 98 func (m *MockHistoryArchiver) ValidateURI(uri URI) error { 99 m.ctrl.T.Helper() 100 ret := m.ctrl.Call(m, "ValidateURI", uri) 101 ret0, _ := ret[0].(error) 102 return ret0 103 } 104 105 // ValidateURI indicates an expected call of ValidateURI. 106 func (mr *MockHistoryArchiverMockRecorder) ValidateURI(uri interface{}) *gomock.Call { 107 mr.mock.ctrl.T.Helper() 108 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateURI", reflect.TypeOf((*MockHistoryArchiver)(nil).ValidateURI), uri) 109 } 110 111 // MockVisibilityArchiver is a mock of VisibilityArchiver interface. 112 type MockVisibilityArchiver struct { 113 ctrl *gomock.Controller 114 recorder *MockVisibilityArchiverMockRecorder 115 } 116 117 // MockVisibilityArchiverMockRecorder is the mock recorder for MockVisibilityArchiver. 118 type MockVisibilityArchiverMockRecorder struct { 119 mock *MockVisibilityArchiver 120 } 121 122 // NewMockVisibilityArchiver creates a new mock instance. 123 func NewMockVisibilityArchiver(ctrl *gomock.Controller) *MockVisibilityArchiver { 124 mock := &MockVisibilityArchiver{ctrl: ctrl} 125 mock.recorder = &MockVisibilityArchiverMockRecorder{mock} 126 return mock 127 } 128 129 // EXPECT returns an object that allows the caller to indicate expected use. 130 func (m *MockVisibilityArchiver) EXPECT() *MockVisibilityArchiverMockRecorder { 131 return m.recorder 132 } 133 134 // Archive mocks base method. 135 func (m *MockVisibilityArchiver) Archive(ctx context.Context, uri URI, request *v1.VisibilityRecord, opts ...ArchiveOption) error { 136 m.ctrl.T.Helper() 137 varargs := []interface{}{ctx, uri, request} 138 for _, a := range opts { 139 varargs = append(varargs, a) 140 } 141 ret := m.ctrl.Call(m, "Archive", varargs...) 142 ret0, _ := ret[0].(error) 143 return ret0 144 } 145 146 // Archive indicates an expected call of Archive. 147 func (mr *MockVisibilityArchiverMockRecorder) Archive(ctx, uri, request interface{}, opts ...interface{}) *gomock.Call { 148 mr.mock.ctrl.T.Helper() 149 varargs := append([]interface{}{ctx, uri, request}, opts...) 150 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Archive", reflect.TypeOf((*MockVisibilityArchiver)(nil).Archive), varargs...) 151 } 152 153 // Query mocks base method. 154 func (m *MockVisibilityArchiver) Query(ctx context.Context, uri URI, request *QueryVisibilityRequest, saTypeMap searchattribute.NameTypeMap) (*QueryVisibilityResponse, error) { 155 m.ctrl.T.Helper() 156 ret := m.ctrl.Call(m, "Query", ctx, uri, request, saTypeMap) 157 ret0, _ := ret[0].(*QueryVisibilityResponse) 158 ret1, _ := ret[1].(error) 159 return ret0, ret1 160 } 161 162 // Query indicates an expected call of Query. 163 func (mr *MockVisibilityArchiverMockRecorder) Query(ctx, uri, request, saTypeMap interface{}) *gomock.Call { 164 mr.mock.ctrl.T.Helper() 165 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockVisibilityArchiver)(nil).Query), ctx, uri, request, saTypeMap) 166 } 167 168 // ValidateURI mocks base method. 169 func (m *MockVisibilityArchiver) ValidateURI(uri URI) error { 170 m.ctrl.T.Helper() 171 ret := m.ctrl.Call(m, "ValidateURI", uri) 172 ret0, _ := ret[0].(error) 173 return ret0 174 } 175 176 // ValidateURI indicates an expected call of ValidateURI. 177 func (mr *MockVisibilityArchiverMockRecorder) ValidateURI(uri interface{}) *gomock.Call { 178 mr.mock.ctrl.T.Helper() 179 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateURI", reflect.TypeOf((*MockVisibilityArchiver)(nil).ValidateURI), uri) 180 }