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