refactor(workflow): Move the plugin component in the Workflow package into the common crossdomain package (#717)
This commit is contained in:
@@ -1,19 +1,3 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: interface.go
|
||||
//
|
||||
@@ -32,6 +16,7 @@ import (
|
||||
model "github.com/cloudwego/eino/components/model"
|
||||
compose "github.com/cloudwego/eino/compose"
|
||||
schema "github.com/cloudwego/eino/schema"
|
||||
plugin "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
workflow "github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
workflow0 "github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
entity "github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
|
||||
@@ -43,6 +28,7 @@ import (
|
||||
type MockService struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockServiceMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockServiceMockRecorder is the mock recorder for MockService.
|
||||
@@ -63,7 +49,7 @@ func (m *MockService) EXPECT() *MockServiceMockRecorder {
|
||||
}
|
||||
|
||||
// AsyncExecute mocks base method.
|
||||
func (m *MockService) AsyncExecute(ctx context.Context, config vo.ExecuteConfig, input map[string]any) (int64, error) {
|
||||
func (m *MockService) AsyncExecute(ctx context.Context, config plugin.ExecuteConfig, input map[string]any) (int64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "AsyncExecute", ctx, config, input)
|
||||
ret0, _ := ret[0].(int64)
|
||||
@@ -78,7 +64,7 @@ func (mr *MockServiceMockRecorder) AsyncExecute(ctx, config, input any) *gomock.
|
||||
}
|
||||
|
||||
// AsyncExecuteNode mocks base method.
|
||||
func (m *MockService) AsyncExecuteNode(ctx context.Context, nodeID string, config vo.ExecuteConfig, input map[string]any) (int64, error) {
|
||||
func (m *MockService) AsyncExecuteNode(ctx context.Context, nodeID string, config plugin.ExecuteConfig, input map[string]any) (int64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "AsyncExecuteNode", ctx, nodeID, config, input)
|
||||
ret0, _ := ret[0].(int64)
|
||||
@@ -93,7 +79,7 @@ func (mr *MockServiceMockRecorder) AsyncExecuteNode(ctx, nodeID, config, input a
|
||||
}
|
||||
|
||||
// AsyncResume mocks base method.
|
||||
func (m *MockService) AsyncResume(ctx context.Context, req *entity.ResumeRequest, config vo.ExecuteConfig) error {
|
||||
func (m *MockService) AsyncResume(ctx context.Context, req *entity.ResumeRequest, config plugin.ExecuteConfig) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "AsyncResume", ctx, req, config)
|
||||
ret0, _ := ret[0].(error)
|
||||
@@ -121,7 +107,7 @@ func (mr *MockServiceMockRecorder) Cancel(ctx, wfExeID, wfID, spaceID any) *gomo
|
||||
}
|
||||
|
||||
// CopyWorkflow mocks base method.
|
||||
func (m *MockService) CopyWorkflow(ctx context.Context, workflowID int64, policy vo.CopyWorkflowPolicy) (*entity.Workflow, error) {
|
||||
func (m *MockService) CopyWorkflow(ctx context.Context, workflowID int64, policy plugin.CopyWorkflowPolicy) (*entity.Workflow, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CopyWorkflow", ctx, workflowID, policy)
|
||||
ret0, _ := ret[0].(*entity.Workflow)
|
||||
@@ -136,7 +122,7 @@ func (mr *MockServiceMockRecorder) CopyWorkflow(ctx, workflowID, policy any) *go
|
||||
}
|
||||
|
||||
// CopyWorkflowFromAppToLibrary mocks base method.
|
||||
func (m *MockService) CopyWorkflowFromAppToLibrary(ctx context.Context, workflowID, appID int64, related vo.ExternalResourceRelated) (map[int64]entity.IDVersionPair, []*vo.ValidateIssue, error) {
|
||||
func (m *MockService) CopyWorkflowFromAppToLibrary(ctx context.Context, workflowID, appID int64, related plugin.ExternalResourceRelated) (map[int64]entity.IDVersionPair, []*vo.ValidateIssue, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CopyWorkflowFromAppToLibrary", ctx, workflowID, appID, related)
|
||||
ret0, _ := ret[0].(map[int64]entity.IDVersionPair)
|
||||
@@ -181,7 +167,7 @@ func (mr *MockServiceMockRecorder) Delete(ctx, policy any) *gomock.Call {
|
||||
}
|
||||
|
||||
// DuplicateWorkflowsByAppID mocks base method.
|
||||
func (m *MockService) DuplicateWorkflowsByAppID(ctx context.Context, sourceAPPID, targetAppID int64, related vo.ExternalResourceRelated) error {
|
||||
func (m *MockService) DuplicateWorkflowsByAppID(ctx context.Context, sourceAPPID, targetAppID int64, related plugin.ExternalResourceRelated) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DuplicateWorkflowsByAppID", ctx, sourceAPPID, targetAppID, related)
|
||||
ret0, _ := ret[0].(error)
|
||||
@@ -274,10 +260,10 @@ func (mr *MockServiceMockRecorder) GetNodeExecution(ctx, exeID, nodeID any) *gom
|
||||
}
|
||||
|
||||
// GetWorkflowDependenceResource mocks base method.
|
||||
func (m *MockService) GetWorkflowDependenceResource(ctx context.Context, workflowID int64) (*vo.DependenceResource, error) {
|
||||
func (m *MockService) GetWorkflowDependenceResource(ctx context.Context, workflowID int64) (*plugin.DependenceResource, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetWorkflowDependenceResource", ctx, workflowID)
|
||||
ret0, _ := ret[0].(*vo.DependenceResource)
|
||||
ret0, _ := ret[0].(*plugin.DependenceResource)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -380,21 +366,21 @@ func (mr *MockServiceMockRecorder) ReleaseApplicationWorkflows(ctx, appID, confi
|
||||
}
|
||||
|
||||
// Save mocks base method.
|
||||
func (m *MockService) Save(ctx context.Context, id int64, schema string) error {
|
||||
func (m *MockService) Save(ctx context.Context, id int64, arg2 string) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Save", ctx, id, schema)
|
||||
ret := m.ctrl.Call(m, "Save", ctx, id, arg2)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Save indicates an expected call of Save.
|
||||
func (mr *MockServiceMockRecorder) Save(ctx, id, schema any) *gomock.Call {
|
||||
func (mr *MockServiceMockRecorder) Save(ctx, id, arg2 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockService)(nil).Save), ctx, id, schema)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockService)(nil).Save), ctx, id, arg2)
|
||||
}
|
||||
|
||||
// StreamExecute mocks base method.
|
||||
func (m *MockService) StreamExecute(ctx context.Context, config vo.ExecuteConfig, input map[string]any) (*schema.StreamReader[*entity.Message], error) {
|
||||
func (m *MockService) StreamExecute(ctx context.Context, config plugin.ExecuteConfig, input map[string]any) (*schema.StreamReader[*entity.Message], error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "StreamExecute", ctx, config, input)
|
||||
ret0, _ := ret[0].(*schema.StreamReader[*entity.Message])
|
||||
@@ -409,7 +395,7 @@ func (mr *MockServiceMockRecorder) StreamExecute(ctx, config, input any) *gomock
|
||||
}
|
||||
|
||||
// StreamResume mocks base method.
|
||||
func (m *MockService) StreamResume(ctx context.Context, req *entity.ResumeRequest, config vo.ExecuteConfig) (*schema.StreamReader[*entity.Message], error) {
|
||||
func (m *MockService) StreamResume(ctx context.Context, req *entity.ResumeRequest, config plugin.ExecuteConfig) (*schema.StreamReader[*entity.Message], error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "StreamResume", ctx, req, config)
|
||||
ret0, _ := ret[0].(*schema.StreamReader[*entity.Message])
|
||||
@@ -424,7 +410,7 @@ func (mr *MockServiceMockRecorder) StreamResume(ctx, req, config any) *gomock.Ca
|
||||
}
|
||||
|
||||
// SyncExecute mocks base method.
|
||||
func (m *MockService) SyncExecute(ctx context.Context, config vo.ExecuteConfig, input map[string]any) (*entity.WorkflowExecution, vo.TerminatePlan, error) {
|
||||
func (m *MockService) SyncExecute(ctx context.Context, config plugin.ExecuteConfig, input map[string]any) (*entity.WorkflowExecution, vo.TerminatePlan, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncExecute", ctx, config, input)
|
||||
ret0, _ := ret[0].(*entity.WorkflowExecution)
|
||||
@@ -440,7 +426,7 @@ func (mr *MockServiceMockRecorder) SyncExecute(ctx, config, input any) *gomock.C
|
||||
}
|
||||
|
||||
// SyncRelatedWorkflowResources mocks base method.
|
||||
func (m *MockService) SyncRelatedWorkflowResources(ctx context.Context, appID int64, relatedWorkflows map[int64]entity.IDVersionPair, related vo.ExternalResourceRelated) error {
|
||||
func (m *MockService) SyncRelatedWorkflowResources(ctx context.Context, appID int64, relatedWorkflows map[int64]entity.IDVersionPair, related plugin.ExternalResourceRelated) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncRelatedWorkflowResources", ctx, appID, relatedWorkflows, related)
|
||||
ret0, _ := ret[0].(error)
|
||||
@@ -483,7 +469,7 @@ func (mr *MockServiceMockRecorder) ValidateTree(ctx, id, validateConfig any) *go
|
||||
}
|
||||
|
||||
// WithExecuteConfig mocks base method.
|
||||
func (m *MockService) WithExecuteConfig(cfg vo.ExecuteConfig) compose.Option {
|
||||
func (m *MockService) WithExecuteConfig(cfg plugin.ExecuteConfig) compose.Option {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "WithExecuteConfig", cfg)
|
||||
ret0, _ := ret[0].(compose.Option)
|
||||
@@ -544,6 +530,7 @@ func (mr *MockServiceMockRecorder) WorkflowAsModelTool(ctx, policies any) *gomoc
|
||||
type MockRepository struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockRepositoryMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockRepositoryMockRecorder is the mock recorder for MockRepository.
|
||||
@@ -592,7 +579,7 @@ func (mr *MockRepositoryMockRecorder) CancelAllRunningNodes(ctx, wfExeID any) *g
|
||||
}
|
||||
|
||||
// CopyWorkflow mocks base method.
|
||||
func (m *MockRepository) CopyWorkflow(ctx context.Context, workflowID int64, policy vo.CopyWorkflowPolicy) (*entity.Workflow, error) {
|
||||
func (m *MockRepository) CopyWorkflow(ctx context.Context, workflowID int64, policy plugin.CopyWorkflowPolicy) (*entity.Workflow, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CopyWorkflow", ctx, workflowID, policy)
|
||||
ret0, _ := ret[0].(*entity.Workflow)
|
||||
|
||||
Reference in New Issue
Block a user