Files
tasks/service/history/ndc/transaction_manager_mock.go

150 lines
6.6 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: transaction_manager.go
// Package ndc is a generated GoMock package.
package ndc
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
namespace "go.temporal.io/server/common/namespace"
persistence "go.temporal.io/server/common/persistence"
)
// MocktransactionMgr is a mock of transactionMgr interface.
type MocktransactionMgr struct {
ctrl *gomock.Controller
recorder *MocktransactionMgrMockRecorder
}
// MocktransactionMgrMockRecorder is the mock recorder for MocktransactionMgr.
type MocktransactionMgrMockRecorder struct {
mock *MocktransactionMgr
}
// NewMocktransactionMgr creates a new mock instance.
func NewMocktransactionMgr(ctrl *gomock.Controller) *MocktransactionMgr {
mock := &MocktransactionMgr{ctrl: ctrl}
mock.recorder = &MocktransactionMgrMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocktransactionMgr) EXPECT() *MocktransactionMgrMockRecorder {
return m.recorder
}
// backfillWorkflow mocks base method.
func (m *MocktransactionMgr) backfillWorkflow(ctx context.Context, now time.Time, targetWorkflow Workflow, targetWorkflowEvents *persistence.WorkflowEvents) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "backfillWorkflow", ctx, now, targetWorkflow, targetWorkflowEvents)
ret0, _ := ret[0].(error)
return ret0
}
// backfillWorkflow indicates an expected call of backfillWorkflow.
func (mr *MocktransactionMgrMockRecorder) backfillWorkflow(ctx, now, targetWorkflow, targetWorkflowEvents interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "backfillWorkflow", reflect.TypeOf((*MocktransactionMgr)(nil).backfillWorkflow), ctx, now, targetWorkflow, targetWorkflowEvents)
}
// checkWorkflowExists mocks base method.
func (m *MocktransactionMgr) checkWorkflowExists(ctx context.Context, namespaceID namespace.ID, workflowID, runID string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "checkWorkflowExists", ctx, namespaceID, workflowID, runID)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// checkWorkflowExists indicates an expected call of checkWorkflowExists.
func (mr *MocktransactionMgrMockRecorder) checkWorkflowExists(ctx, namespaceID, workflowID, runID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "checkWorkflowExists", reflect.TypeOf((*MocktransactionMgr)(nil).checkWorkflowExists), ctx, namespaceID, workflowID, runID)
}
// createWorkflow mocks base method.
func (m *MocktransactionMgr) createWorkflow(ctx context.Context, now time.Time, targetWorkflow Workflow) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "createWorkflow", ctx, now, targetWorkflow)
ret0, _ := ret[0].(error)
return ret0
}
// createWorkflow indicates an expected call of createWorkflow.
func (mr *MocktransactionMgrMockRecorder) createWorkflow(ctx, now, targetWorkflow interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createWorkflow", reflect.TypeOf((*MocktransactionMgr)(nil).createWorkflow), ctx, now, targetWorkflow)
}
// getCurrentWorkflowRunID mocks base method.
func (m *MocktransactionMgr) getCurrentWorkflowRunID(ctx context.Context, namespaceID namespace.ID, workflowID string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "getCurrentWorkflowRunID", ctx, namespaceID, workflowID)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// getCurrentWorkflowRunID indicates an expected call of getCurrentWorkflowRunID.
func (mr *MocktransactionMgrMockRecorder) getCurrentWorkflowRunID(ctx, namespaceID, workflowID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getCurrentWorkflowRunID", reflect.TypeOf((*MocktransactionMgr)(nil).getCurrentWorkflowRunID), ctx, namespaceID, workflowID)
}
// loadWorkflow mocks base method.
func (m *MocktransactionMgr) loadWorkflow(ctx context.Context, namespaceID namespace.ID, workflowID, runID string) (Workflow, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "loadWorkflow", ctx, namespaceID, workflowID, runID)
ret0, _ := ret[0].(Workflow)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// loadWorkflow indicates an expected call of loadWorkflow.
func (mr *MocktransactionMgrMockRecorder) loadWorkflow(ctx, namespaceID, workflowID, runID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "loadWorkflow", reflect.TypeOf((*MocktransactionMgr)(nil).loadWorkflow), ctx, namespaceID, workflowID, runID)
}
// updateWorkflow mocks base method.
func (m *MocktransactionMgr) updateWorkflow(ctx context.Context, now time.Time, isWorkflowRebuilt bool, targetWorkflow, newWorkflow Workflow) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "updateWorkflow", ctx, now, isWorkflowRebuilt, targetWorkflow, newWorkflow)
ret0, _ := ret[0].(error)
return ret0
}
// updateWorkflow indicates an expected call of updateWorkflow.
func (mr *MocktransactionMgrMockRecorder) updateWorkflow(ctx, now, isWorkflowRebuilt, targetWorkflow, newWorkflow interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "updateWorkflow", reflect.TypeOf((*MocktransactionMgr)(nil).updateWorkflow), ctx, now, isWorkflowRebuilt, targetWorkflow, newWorkflow)
}