mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-25 13:35:32 -04:00
3d28e0ceed
* feat: Add code generation for plugin controllers and services - Introduced a code generation mechanism for plugin controllers and services, allowing for automatic generation based on defined dispatchers. - Created new files for generated controllers, services, and templates to streamline the plugin invocation process. - Removed outdated functions related to tool validation and runtime parameters, consolidating functionality into generated files. - Updated dependencies in go.mod and go.sum to include necessary packages for the new code generation features. * fix
37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
// Code generated by controller generator. DO NOT EDIT.
|
|
|
|
package plugin_daemon
|
|
|
|
import (
|
|
"github.com/langgenius/dify-plugin-daemon/internal/core/session_manager"
|
|
"github.com/langgenius/dify-plugin-daemon/internal/utils/stream"
|
|
"github.com/langgenius/dify-plugin-daemon/pkg/entities/requests"
|
|
"github.com/langgenius/dify-plugin-daemon/pkg/entities/tool_entities"
|
|
)
|
|
|
|
func ValidateToolCredentials(
|
|
session *session_manager.Session,
|
|
request *requests.RequestValidateToolCredentials,
|
|
) (
|
|
*stream.Stream[tool_entities.ValidateCredentialsResult], error,
|
|
) {
|
|
return GenericInvokePlugin[requests.RequestValidateToolCredentials, tool_entities.ValidateCredentialsResult](
|
|
session,
|
|
request,
|
|
1,
|
|
)
|
|
}
|
|
|
|
func GetToolRuntimeParameters(
|
|
session *session_manager.Session,
|
|
request *requests.RequestGetToolRuntimeParameters,
|
|
) (
|
|
*stream.Stream[tool_entities.GetToolRuntimeParametersResponse], error,
|
|
) {
|
|
return GenericInvokePlugin[requests.RequestGetToolRuntimeParameters, tool_entities.GetToolRuntimeParametersResponse](
|
|
session,
|
|
request,
|
|
1,
|
|
)
|
|
}
|