Files
tasks/common/persistence/visibility/manager/visibility_manager_mock.go

365 lines
17 KiB
Go

// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Code generated by MockGen. DO NOT EDIT.
// Source: visibility_manager.go
// Package manager is a generated GoMock package.
package manager
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
namespace "go.temporal.io/server/common/namespace"
)
// MockVisibilityManager is a mock of VisibilityManager interface.
type MockVisibilityManager struct {
ctrl *gomock.Controller
recorder *MockVisibilityManagerMockRecorder
}
// MockVisibilityManagerMockRecorder is the mock recorder for MockVisibilityManager.
type MockVisibilityManagerMockRecorder struct {
mock *MockVisibilityManager
}
// NewMockVisibilityManager creates a new mock instance.
func NewMockVisibilityManager(ctrl *gomock.Controller) *MockVisibilityManager {
mock := &MockVisibilityManager{ctrl: ctrl}
mock.recorder = &MockVisibilityManagerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockVisibilityManager) EXPECT() *MockVisibilityManagerMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockVisibilityManager) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close.
func (mr *MockVisibilityManagerMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockVisibilityManager)(nil).Close))
}
// CountWorkflowExecutions mocks base method.
func (m *MockVisibilityManager) CountWorkflowExecutions(ctx context.Context, request *CountWorkflowExecutionsRequest) (*CountWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CountWorkflowExecutions", ctx, request)
ret0, _ := ret[0].(*CountWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CountWorkflowExecutions indicates an expected call of CountWorkflowExecutions.
func (mr *MockVisibilityManagerMockRecorder) CountWorkflowExecutions(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountWorkflowExecutions", reflect.TypeOf((*MockVisibilityManager)(nil).CountWorkflowExecutions), ctx, request)
}
// DeleteWorkflowExecution mocks base method.
func (m *MockVisibilityManager) DeleteWorkflowExecution(ctx context.Context, request *VisibilityDeleteWorkflowExecutionRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteWorkflowExecution", ctx, request)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteWorkflowExecution indicates an expected call of DeleteWorkflowExecution.
func (mr *MockVisibilityManagerMockRecorder) DeleteWorkflowExecution(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorkflowExecution", reflect.TypeOf((*MockVisibilityManager)(nil).DeleteWorkflowExecution), ctx, request)
}
// GetIndexName mocks base method.
func (m *MockVisibilityManager) GetIndexName() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetIndexName")
ret0, _ := ret[0].(string)
return ret0
}
// GetIndexName indicates an expected call of GetIndexName.
func (mr *MockVisibilityManagerMockRecorder) GetIndexName() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndexName", reflect.TypeOf((*MockVisibilityManager)(nil).GetIndexName))
}
// GetReadStoreName mocks base method.
func (m *MockVisibilityManager) GetReadStoreName(nsName namespace.Name) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetReadStoreName", nsName)
ret0, _ := ret[0].(string)
return ret0
}
// GetReadStoreName indicates an expected call of GetReadStoreName.
func (mr *MockVisibilityManagerMockRecorder) GetReadStoreName(nsName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReadStoreName", reflect.TypeOf((*MockVisibilityManager)(nil).GetReadStoreName), nsName)
}
// GetStoreNames mocks base method.
func (m *MockVisibilityManager) GetStoreNames() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStoreNames")
ret0, _ := ret[0].([]string)
return ret0
}
// GetStoreNames indicates an expected call of GetStoreNames.
func (mr *MockVisibilityManagerMockRecorder) GetStoreNames() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoreNames", reflect.TypeOf((*MockVisibilityManager)(nil).GetStoreNames))
}
// GetWorkflowExecution mocks base method.
func (m *MockVisibilityManager) GetWorkflowExecution(ctx context.Context, request *GetWorkflowExecutionRequest) (*GetWorkflowExecutionResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetWorkflowExecution", ctx, request)
ret0, _ := ret[0].(*GetWorkflowExecutionResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetWorkflowExecution indicates an expected call of GetWorkflowExecution.
func (mr *MockVisibilityManagerMockRecorder) GetWorkflowExecution(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowExecution", reflect.TypeOf((*MockVisibilityManager)(nil).GetWorkflowExecution), ctx, request)
}
// HasStoreName mocks base method.
func (m *MockVisibilityManager) HasStoreName(stName string) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasStoreName", stName)
ret0, _ := ret[0].(bool)
return ret0
}
// HasStoreName indicates an expected call of HasStoreName.
func (mr *MockVisibilityManagerMockRecorder) HasStoreName(stName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasStoreName", reflect.TypeOf((*MockVisibilityManager)(nil).HasStoreName), stName)
}
// ListClosedWorkflowExecutions mocks base method.
func (m *MockVisibilityManager) ListClosedWorkflowExecutions(ctx context.Context, request *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListClosedWorkflowExecutions", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListClosedWorkflowExecutions indicates an expected call of ListClosedWorkflowExecutions.
func (mr *MockVisibilityManagerMockRecorder) ListClosedWorkflowExecutions(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutions", reflect.TypeOf((*MockVisibilityManager)(nil).ListClosedWorkflowExecutions), ctx, request)
}
// ListClosedWorkflowExecutionsByStatus mocks base method.
func (m *MockVisibilityManager) ListClosedWorkflowExecutionsByStatus(ctx context.Context, request *ListClosedWorkflowExecutionsByStatusRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListClosedWorkflowExecutionsByStatus", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListClosedWorkflowExecutionsByStatus indicates an expected call of ListClosedWorkflowExecutionsByStatus.
func (mr *MockVisibilityManagerMockRecorder) ListClosedWorkflowExecutionsByStatus(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutionsByStatus", reflect.TypeOf((*MockVisibilityManager)(nil).ListClosedWorkflowExecutionsByStatus), ctx, request)
}
// ListClosedWorkflowExecutionsByType mocks base method.
func (m *MockVisibilityManager) ListClosedWorkflowExecutionsByType(ctx context.Context, request *ListWorkflowExecutionsByTypeRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListClosedWorkflowExecutionsByType", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListClosedWorkflowExecutionsByType indicates an expected call of ListClosedWorkflowExecutionsByType.
func (mr *MockVisibilityManagerMockRecorder) ListClosedWorkflowExecutionsByType(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutionsByType", reflect.TypeOf((*MockVisibilityManager)(nil).ListClosedWorkflowExecutionsByType), ctx, request)
}
// ListClosedWorkflowExecutionsByWorkflowID mocks base method.
func (m *MockVisibilityManager) ListClosedWorkflowExecutionsByWorkflowID(ctx context.Context, request *ListWorkflowExecutionsByWorkflowIDRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListClosedWorkflowExecutionsByWorkflowID", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListClosedWorkflowExecutionsByWorkflowID indicates an expected call of ListClosedWorkflowExecutionsByWorkflowID.
func (mr *MockVisibilityManagerMockRecorder) ListClosedWorkflowExecutionsByWorkflowID(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClosedWorkflowExecutionsByWorkflowID", reflect.TypeOf((*MockVisibilityManager)(nil).ListClosedWorkflowExecutionsByWorkflowID), ctx, request)
}
// ListOpenWorkflowExecutions mocks base method.
func (m *MockVisibilityManager) ListOpenWorkflowExecutions(ctx context.Context, request *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListOpenWorkflowExecutions", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListOpenWorkflowExecutions indicates an expected call of ListOpenWorkflowExecutions.
func (mr *MockVisibilityManagerMockRecorder) ListOpenWorkflowExecutions(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenWorkflowExecutions", reflect.TypeOf((*MockVisibilityManager)(nil).ListOpenWorkflowExecutions), ctx, request)
}
// ListOpenWorkflowExecutionsByType mocks base method.
func (m *MockVisibilityManager) ListOpenWorkflowExecutionsByType(ctx context.Context, request *ListWorkflowExecutionsByTypeRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListOpenWorkflowExecutionsByType", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListOpenWorkflowExecutionsByType indicates an expected call of ListOpenWorkflowExecutionsByType.
func (mr *MockVisibilityManagerMockRecorder) ListOpenWorkflowExecutionsByType(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenWorkflowExecutionsByType", reflect.TypeOf((*MockVisibilityManager)(nil).ListOpenWorkflowExecutionsByType), ctx, request)
}
// ListOpenWorkflowExecutionsByWorkflowID mocks base method.
func (m *MockVisibilityManager) ListOpenWorkflowExecutionsByWorkflowID(ctx context.Context, request *ListWorkflowExecutionsByWorkflowIDRequest) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListOpenWorkflowExecutionsByWorkflowID", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListOpenWorkflowExecutionsByWorkflowID indicates an expected call of ListOpenWorkflowExecutionsByWorkflowID.
func (mr *MockVisibilityManagerMockRecorder) ListOpenWorkflowExecutionsByWorkflowID(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenWorkflowExecutionsByWorkflowID", reflect.TypeOf((*MockVisibilityManager)(nil).ListOpenWorkflowExecutionsByWorkflowID), ctx, request)
}
// ListWorkflowExecutions mocks base method.
func (m *MockVisibilityManager) ListWorkflowExecutions(ctx context.Context, request *ListWorkflowExecutionsRequestV2) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListWorkflowExecutions", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListWorkflowExecutions indicates an expected call of ListWorkflowExecutions.
func (mr *MockVisibilityManagerMockRecorder) ListWorkflowExecutions(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListWorkflowExecutions", reflect.TypeOf((*MockVisibilityManager)(nil).ListWorkflowExecutions), ctx, request)
}
// RecordWorkflowExecutionClosed mocks base method.
func (m *MockVisibilityManager) RecordWorkflowExecutionClosed(ctx context.Context, request *RecordWorkflowExecutionClosedRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RecordWorkflowExecutionClosed", ctx, request)
ret0, _ := ret[0].(error)
return ret0
}
// RecordWorkflowExecutionClosed indicates an expected call of RecordWorkflowExecutionClosed.
func (mr *MockVisibilityManagerMockRecorder) RecordWorkflowExecutionClosed(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordWorkflowExecutionClosed", reflect.TypeOf((*MockVisibilityManager)(nil).RecordWorkflowExecutionClosed), ctx, request)
}
// RecordWorkflowExecutionStarted mocks base method.
func (m *MockVisibilityManager) RecordWorkflowExecutionStarted(ctx context.Context, request *RecordWorkflowExecutionStartedRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RecordWorkflowExecutionStarted", ctx, request)
ret0, _ := ret[0].(error)
return ret0
}
// RecordWorkflowExecutionStarted indicates an expected call of RecordWorkflowExecutionStarted.
func (mr *MockVisibilityManagerMockRecorder) RecordWorkflowExecutionStarted(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordWorkflowExecutionStarted", reflect.TypeOf((*MockVisibilityManager)(nil).RecordWorkflowExecutionStarted), ctx, request)
}
// ScanWorkflowExecutions mocks base method.
func (m *MockVisibilityManager) ScanWorkflowExecutions(ctx context.Context, request *ListWorkflowExecutionsRequestV2) (*ListWorkflowExecutionsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ScanWorkflowExecutions", ctx, request)
ret0, _ := ret[0].(*ListWorkflowExecutionsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ScanWorkflowExecutions indicates an expected call of ScanWorkflowExecutions.
func (mr *MockVisibilityManagerMockRecorder) ScanWorkflowExecutions(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScanWorkflowExecutions", reflect.TypeOf((*MockVisibilityManager)(nil).ScanWorkflowExecutions), ctx, request)
}
// UpsertWorkflowExecution mocks base method.
func (m *MockVisibilityManager) UpsertWorkflowExecution(ctx context.Context, request *UpsertWorkflowExecutionRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpsertWorkflowExecution", ctx, request)
ret0, _ := ret[0].(error)
return ret0
}
// UpsertWorkflowExecution indicates an expected call of UpsertWorkflowExecution.
func (mr *MockVisibilityManagerMockRecorder) UpsertWorkflowExecution(ctx, request interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorkflowExecution", reflect.TypeOf((*MockVisibilityManager)(nil).UpsertWorkflowExecution), ctx, request)
}
// ValidateCustomSearchAttributes mocks base method.
func (m *MockVisibilityManager) ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ValidateCustomSearchAttributes", searchAttributes)
ret0, _ := ret[0].(map[string]any)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ValidateCustomSearchAttributes indicates an expected call of ValidateCustomSearchAttributes.
func (mr *MockVisibilityManagerMockRecorder) ValidateCustomSearchAttributes(searchAttributes interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateCustomSearchAttributes", reflect.TypeOf((*MockVisibilityManager)(nil).ValidateCustomSearchAttributes), searchAttributes)
}