mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
154 lines
6.6 KiB
Go
154 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"
|
|
|
|
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, targetWorkflow Workflow, targetWorkflowEventsSlice ...*persistence.WorkflowEvents) error {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{ctx, targetWorkflow}
|
|
for _, a := range targetWorkflowEventsSlice {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "backfillWorkflow", varargs...)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// backfillWorkflow indicates an expected call of backfillWorkflow.
|
|
func (mr *MocktransactionMgrMockRecorder) backfillWorkflow(ctx, targetWorkflow interface{}, targetWorkflowEventsSlice ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{ctx, targetWorkflow}, targetWorkflowEventsSlice...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "backfillWorkflow", reflect.TypeOf((*MocktransactionMgr)(nil).backfillWorkflow), varargs...)
|
|
}
|
|
|
|
// 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, targetWorkflow Workflow) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "createWorkflow", ctx, targetWorkflow)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// createWorkflow indicates an expected call of createWorkflow.
|
|
func (mr *MocktransactionMgrMockRecorder) createWorkflow(ctx, targetWorkflow interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createWorkflow", reflect.TypeOf((*MocktransactionMgr)(nil).createWorkflow), ctx, 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, isWorkflowRebuilt bool, targetWorkflow, newWorkflow Workflow) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "updateWorkflow", ctx, isWorkflowRebuilt, targetWorkflow, newWorkflow)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// updateWorkflow indicates an expected call of updateWorkflow.
|
|
func (mr *MocktransactionMgrMockRecorder) updateWorkflow(ctx, 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, isWorkflowRebuilt, targetWorkflow, newWorkflow)
|
|
}
|