go.temporal.io/server@v1.23.0/common/persistence/visibility/store/visibility_store_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: visibility_store.go
    27  
    28  // Package store is a generated GoMock package.
    29  package store
    30  
    31  import (
    32  	context "context"
    33  	reflect "reflect"
    34  
    35  	gomock "github.com/golang/mock/gomock"
    36  	manager "go.temporal.io/server/common/persistence/visibility/manager"
    37  )
    38  
    39  // MockVisibilityStore is a mock of VisibilityStore interface.
    40  type MockVisibilityStore struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockVisibilityStoreMockRecorder
    43  }
    44  
    45  // MockVisibilityStoreMockRecorder is the mock recorder for MockVisibilityStore.
    46  type MockVisibilityStoreMockRecorder struct {
    47  	mock *MockVisibilityStore
    48  }
    49  
    50  // NewMockVisibilityStore creates a new mock instance.
    51  func NewMockVisibilityStore(ctrl *gomock.Controller) *MockVisibilityStore {
    52  	mock := &MockVisibilityStore{ctrl: ctrl}
    53  	mock.recorder = &MockVisibilityStoreMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockVisibilityStore) EXPECT() *MockVisibilityStoreMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // Close mocks base method.
    63  func (m *MockVisibilityStore) Close() {
    64  	m.ctrl.T.Helper()
    65  	m.ctrl.Call(m, "Close")
    66  }
    67  
    68  // Close indicates an expected call of Close.
    69  func (mr *MockVisibilityStoreMockRecorder) Close() *gomock.Call {
    70  	mr.mock.ctrl.T.Helper()
    71  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockVisibilityStore)(nil).Close))
    72  }
    73  
    74  // CountWorkflowExecutions mocks base method.
    75  func (m *MockVisibilityStore) CountWorkflowExecutions(ctx context.Context, request *manager.CountWorkflowExecutionsRequest) (*manager.CountWorkflowExecutionsResponse, error) {
    76  	m.ctrl.T.Helper()
    77  	ret := m.ctrl.Call(m, "CountWorkflowExecutions", ctx, request)
    78  	ret0, _ := ret[0].(*manager.CountWorkflowExecutionsResponse)
    79  	ret1, _ := ret[1].(error)
    80  	return ret0, ret1
    81  }
    82  
    83  // CountWorkflowExecutions indicates an expected call of CountWorkflowExecutions.
    84  func (mr *MockVisibilityStoreMockRecorder) CountWorkflowExecutions(ctx, request interface{}) *gomock.Call {
    85  	mr.mock.ctrl.T.Helper()
    86  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountWorkflowExecutions", reflect.TypeOf((*MockVisibilityStore)(nil).CountWorkflowExecutions), ctx, request)
    87  }
    88  
    89  // DeleteWorkflowExecution mocks base method.
    90  func (m *MockVisibilityStore) DeleteWorkflowExecution(ctx context.Context, request *manager.VisibilityDeleteWorkflowExecutionRequest) error {
    91  	m.ctrl.T.Helper()
    92  	ret := m.ctrl.Call(m, "DeleteWorkflowExecution", ctx, request)
    93  	ret0, _ := ret[0].(error)
    94  	return ret0
    95  }
    96  
    97  // DeleteWorkflowExecution indicates an expected call of DeleteWorkflowExecution.
    98  func (mr *MockVisibilityStoreMockRecorder) DeleteWorkflowExecution(ctx, request interface{}) *gomock.Call {
    99  	mr.mock.ctrl.T.Helper()
   100  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorkflowExecution", reflect.TypeOf((*MockVisibilityStore)(nil).DeleteWorkflowExecution), ctx, request)
   101  }
   102  
   103  // GetIndexName mocks base method.
   104  func (m *MockVisibilityStore) GetIndexName() string {
   105  	m.ctrl.T.Helper()
   106  	ret := m.ctrl.Call(m, "GetIndexName")
   107  	ret0, _ := ret[0].(string)
   108  	return ret0
   109  }
   110  
   111  // GetIndexName indicates an expected call of GetIndexName.
   112  func (mr *MockVisibilityStoreMockRecorder) GetIndexName() *gomock.Call {
   113  	mr.mock.ctrl.T.Helper()
   114  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndexName", reflect.TypeOf((*MockVisibilityStore)(nil).GetIndexName))
   115  }
   116  
   117  // GetName mocks base method.
   118  func (m *MockVisibilityStore) GetName() string {
   119  	m.ctrl.T.Helper()
   120  	ret := m.ctrl.Call(m, "GetName")
   121  	ret0, _ := ret[0].(string)
   122  	return ret0
   123  }
   124  
   125  // GetName indicates an expected call of GetName.
   126  func (mr *MockVisibilityStoreMockRecorder) GetName() *gomock.Call {
   127  	mr.mock.ctrl.T.Helper()
   128  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetName", reflect.TypeOf((*MockVisibilityStore)(nil).GetName))
   129  }
   130  
   131  // GetWorkflowExecution mocks base method.
   132  func (m *MockVisibilityStore) GetWorkflowExecution(ctx context.Context, request *manager.GetWorkflowExecutionRequest) (*InternalGetWorkflowExecutionResponse, error) {
   133  	m.ctrl.T.Helper()
   134  	ret := m.ctrl.Call(m, "GetWorkflowExecution", ctx, request)
   135  	ret0, _ := ret[0].(*InternalGetWorkflowExecutionResponse)
   136  	ret1, _ := ret[1].(error)
   137  	return ret0, ret1
   138  }
   139  
   140  // GetWorkflowExecution indicates an expected call of GetWorkflowExecution.
   141  func (mr *MockVisibilityStoreMockRecorder) GetWorkflowExecution(ctx, request interface{}) *gomock.Call {
   142  	mr.mock.ctrl.T.Helper()
   143  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowExecution", reflect.TypeOf((*MockVisibilityStore)(nil).GetWorkflowExecution), ctx, request)
   144  }
   145  
   146  // ListClosedWorkflowExecutions mocks base method.
   147  func (m *MockVisibilityStore) ListClosedWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequest) (*InternalListWorkflowExecutionsResponse, error) {
   148  	m.ctrl.T.Helper()
   149  	ret := m.ctrl.Call(m, "ListClosedWorkflowExecutions", ctx, request)
   150  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   151  	ret1, _ := ret[1].(error)
   152  	return ret0, ret1
   153  }
   154  
   155  // ListClosedWorkflowExecutions indicates an expected call of ListClosedWorkflowExecutions.
   156  func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutions(ctx, request interface{}) *gomock.Call {
   157  	mr.mock.ctrl.T.Helper()
   158  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutions", reflect.TypeOf((*MockVisibilityStore)(nil).ListClosedWorkflowExecutions), ctx, request)
   159  }
   160  
   161  // ListClosedWorkflowExecutionsByStatus mocks base method.
   162  func (m *MockVisibilityStore) ListClosedWorkflowExecutionsByStatus(ctx context.Context, request *manager.ListClosedWorkflowExecutionsByStatusRequest) (*InternalListWorkflowExecutionsResponse, error) {
   163  	m.ctrl.T.Helper()
   164  	ret := m.ctrl.Call(m, "ListClosedWorkflowExecutionsByStatus", ctx, request)
   165  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   166  	ret1, _ := ret[1].(error)
   167  	return ret0, ret1
   168  }
   169  
   170  // ListClosedWorkflowExecutionsByStatus indicates an expected call of ListClosedWorkflowExecutionsByStatus.
   171  func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByStatus(ctx, request interface{}) *gomock.Call {
   172  	mr.mock.ctrl.T.Helper()
   173  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutionsByStatus", reflect.TypeOf((*MockVisibilityStore)(nil).ListClosedWorkflowExecutionsByStatus), ctx, request)
   174  }
   175  
   176  // ListClosedWorkflowExecutionsByType mocks base method.
   177  func (m *MockVisibilityStore) ListClosedWorkflowExecutionsByType(ctx context.Context, request *manager.ListWorkflowExecutionsByTypeRequest) (*InternalListWorkflowExecutionsResponse, error) {
   178  	m.ctrl.T.Helper()
   179  	ret := m.ctrl.Call(m, "ListClosedWorkflowExecutionsByType", ctx, request)
   180  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   181  	ret1, _ := ret[1].(error)
   182  	return ret0, ret1
   183  }
   184  
   185  // ListClosedWorkflowExecutionsByType indicates an expected call of ListClosedWorkflowExecutionsByType.
   186  func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByType(ctx, request interface{}) *gomock.Call {
   187  	mr.mock.ctrl.T.Helper()
   188  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutionsByType", reflect.TypeOf((*MockVisibilityStore)(nil).ListClosedWorkflowExecutionsByType), ctx, request)
   189  }
   190  
   191  // ListClosedWorkflowExecutionsByWorkflowID mocks base method.
   192  func (m *MockVisibilityStore) ListClosedWorkflowExecutionsByWorkflowID(ctx context.Context, request *manager.ListWorkflowExecutionsByWorkflowIDRequest) (*InternalListWorkflowExecutionsResponse, error) {
   193  	m.ctrl.T.Helper()
   194  	ret := m.ctrl.Call(m, "ListClosedWorkflowExecutionsByWorkflowID", ctx, request)
   195  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   196  	ret1, _ := ret[1].(error)
   197  	return ret0, ret1
   198  }
   199  
   200  // ListClosedWorkflowExecutionsByWorkflowID indicates an expected call of ListClosedWorkflowExecutionsByWorkflowID.
   201  func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByWorkflowID(ctx, request interface{}) *gomock.Call {
   202  	mr.mock.ctrl.T.Helper()
   203  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutionsByWorkflowID", reflect.TypeOf((*MockVisibilityStore)(nil).ListClosedWorkflowExecutionsByWorkflowID), ctx, request)
   204  }
   205  
   206  // ListOpenWorkflowExecutions mocks base method.
   207  func (m *MockVisibilityStore) ListOpenWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequest) (*InternalListWorkflowExecutionsResponse, error) {
   208  	m.ctrl.T.Helper()
   209  	ret := m.ctrl.Call(m, "ListOpenWorkflowExecutions", ctx, request)
   210  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   211  	ret1, _ := ret[1].(error)
   212  	return ret0, ret1
   213  }
   214  
   215  // ListOpenWorkflowExecutions indicates an expected call of ListOpenWorkflowExecutions.
   216  func (mr *MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutions(ctx, request interface{}) *gomock.Call {
   217  	mr.mock.ctrl.T.Helper()
   218  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenWorkflowExecutions", reflect.TypeOf((*MockVisibilityStore)(nil).ListOpenWorkflowExecutions), ctx, request)
   219  }
   220  
   221  // ListOpenWorkflowExecutionsByType mocks base method.
   222  func (m *MockVisibilityStore) ListOpenWorkflowExecutionsByType(ctx context.Context, request *manager.ListWorkflowExecutionsByTypeRequest) (*InternalListWorkflowExecutionsResponse, error) {
   223  	m.ctrl.T.Helper()
   224  	ret := m.ctrl.Call(m, "ListOpenWorkflowExecutionsByType", ctx, request)
   225  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   226  	ret1, _ := ret[1].(error)
   227  	return ret0, ret1
   228  }
   229  
   230  // ListOpenWorkflowExecutionsByType indicates an expected call of ListOpenWorkflowExecutionsByType.
   231  func (mr *MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutionsByType(ctx, request interface{}) *gomock.Call {
   232  	mr.mock.ctrl.T.Helper()
   233  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenWorkflowExecutionsByType", reflect.TypeOf((*MockVisibilityStore)(nil).ListOpenWorkflowExecutionsByType), ctx, request)
   234  }
   235  
   236  // ListOpenWorkflowExecutionsByWorkflowID mocks base method.
   237  func (m *MockVisibilityStore) ListOpenWorkflowExecutionsByWorkflowID(ctx context.Context, request *manager.ListWorkflowExecutionsByWorkflowIDRequest) (*InternalListWorkflowExecutionsResponse, error) {
   238  	m.ctrl.T.Helper()
   239  	ret := m.ctrl.Call(m, "ListOpenWorkflowExecutionsByWorkflowID", ctx, request)
   240  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   241  	ret1, _ := ret[1].(error)
   242  	return ret0, ret1
   243  }
   244  
   245  // ListOpenWorkflowExecutionsByWorkflowID indicates an expected call of ListOpenWorkflowExecutionsByWorkflowID.
   246  func (mr *MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutionsByWorkflowID(ctx, request interface{}) *gomock.Call {
   247  	mr.mock.ctrl.T.Helper()
   248  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenWorkflowExecutionsByWorkflowID", reflect.TypeOf((*MockVisibilityStore)(nil).ListOpenWorkflowExecutionsByWorkflowID), ctx, request)
   249  }
   250  
   251  // ListWorkflowExecutions mocks base method.
   252  func (m *MockVisibilityStore) ListWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListWorkflowExecutionsResponse, error) {
   253  	m.ctrl.T.Helper()
   254  	ret := m.ctrl.Call(m, "ListWorkflowExecutions", ctx, request)
   255  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   256  	ret1, _ := ret[1].(error)
   257  	return ret0, ret1
   258  }
   259  
   260  // ListWorkflowExecutions indicates an expected call of ListWorkflowExecutions.
   261  func (mr *MockVisibilityStoreMockRecorder) ListWorkflowExecutions(ctx, request interface{}) *gomock.Call {
   262  	mr.mock.ctrl.T.Helper()
   263  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListWorkflowExecutions", reflect.TypeOf((*MockVisibilityStore)(nil).ListWorkflowExecutions), ctx, request)
   264  }
   265  
   266  // RecordWorkflowExecutionClosed mocks base method.
   267  func (m *MockVisibilityStore) RecordWorkflowExecutionClosed(ctx context.Context, request *InternalRecordWorkflowExecutionClosedRequest) error {
   268  	m.ctrl.T.Helper()
   269  	ret := m.ctrl.Call(m, "RecordWorkflowExecutionClosed", ctx, request)
   270  	ret0, _ := ret[0].(error)
   271  	return ret0
   272  }
   273  
   274  // RecordWorkflowExecutionClosed indicates an expected call of RecordWorkflowExecutionClosed.
   275  func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionClosed(ctx, request interface{}) *gomock.Call {
   276  	mr.mock.ctrl.T.Helper()
   277  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordWorkflowExecutionClosed", reflect.TypeOf((*MockVisibilityStore)(nil).RecordWorkflowExecutionClosed), ctx, request)
   278  }
   279  
   280  // RecordWorkflowExecutionStarted mocks base method.
   281  func (m *MockVisibilityStore) RecordWorkflowExecutionStarted(ctx context.Context, request *InternalRecordWorkflowExecutionStartedRequest) error {
   282  	m.ctrl.T.Helper()
   283  	ret := m.ctrl.Call(m, "RecordWorkflowExecutionStarted", ctx, request)
   284  	ret0, _ := ret[0].(error)
   285  	return ret0
   286  }
   287  
   288  // RecordWorkflowExecutionStarted indicates an expected call of RecordWorkflowExecutionStarted.
   289  func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionStarted(ctx, request interface{}) *gomock.Call {
   290  	mr.mock.ctrl.T.Helper()
   291  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordWorkflowExecutionStarted", reflect.TypeOf((*MockVisibilityStore)(nil).RecordWorkflowExecutionStarted), ctx, request)
   292  }
   293  
   294  // ScanWorkflowExecutions mocks base method.
   295  func (m *MockVisibilityStore) ScanWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListWorkflowExecutionsResponse, error) {
   296  	m.ctrl.T.Helper()
   297  	ret := m.ctrl.Call(m, "ScanWorkflowExecutions", ctx, request)
   298  	ret0, _ := ret[0].(*InternalListWorkflowExecutionsResponse)
   299  	ret1, _ := ret[1].(error)
   300  	return ret0, ret1
   301  }
   302  
   303  // ScanWorkflowExecutions indicates an expected call of ScanWorkflowExecutions.
   304  func (mr *MockVisibilityStoreMockRecorder) ScanWorkflowExecutions(ctx, request interface{}) *gomock.Call {
   305  	mr.mock.ctrl.T.Helper()
   306  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScanWorkflowExecutions", reflect.TypeOf((*MockVisibilityStore)(nil).ScanWorkflowExecutions), ctx, request)
   307  }
   308  
   309  // UpsertWorkflowExecution mocks base method.
   310  func (m *MockVisibilityStore) UpsertWorkflowExecution(ctx context.Context, request *InternalUpsertWorkflowExecutionRequest) error {
   311  	m.ctrl.T.Helper()
   312  	ret := m.ctrl.Call(m, "UpsertWorkflowExecution", ctx, request)
   313  	ret0, _ := ret[0].(error)
   314  	return ret0
   315  }
   316  
   317  // UpsertWorkflowExecution indicates an expected call of UpsertWorkflowExecution.
   318  func (mr *MockVisibilityStoreMockRecorder) UpsertWorkflowExecution(ctx, request interface{}) *gomock.Call {
   319  	mr.mock.ctrl.T.Helper()
   320  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorkflowExecution", reflect.TypeOf((*MockVisibilityStore)(nil).UpsertWorkflowExecution), ctx, request)
   321  }
   322  
   323  // ValidateCustomSearchAttributes mocks base method.
   324  func (m *MockVisibilityStore) ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error) {
   325  	m.ctrl.T.Helper()
   326  	ret := m.ctrl.Call(m, "ValidateCustomSearchAttributes", searchAttributes)
   327  	ret0, _ := ret[0].(map[string]any)
   328  	ret1, _ := ret[1].(error)
   329  	return ret0, ret1
   330  }
   331  
   332  // ValidateCustomSearchAttributes indicates an expected call of ValidateCustomSearchAttributes.
   333  func (mr *MockVisibilityStoreMockRecorder) ValidateCustomSearchAttributes(searchAttributes interface{}) *gomock.Call {
   334  	mr.mock.ctrl.T.Helper()
   335  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateCustomSearchAttributes", reflect.TypeOf((*MockVisibilityStore)(nil).ValidateCustomSearchAttributes), searchAttributes)
   336  }