debugging.go 549 B

12345678910111213141516171819202122232425
  1. package service
  2. import (
  3. "github.com/langgenius/dify-plugin-daemon/internal/core/plugin_manager/remote_manager"
  4. "github.com/langgenius/dify-plugin-daemon/internal/types/entities"
  5. )
  6. func GetRemoteDebuggingKey(tenant_id string) entities.Response {
  7. type response struct {
  8. Key string `json:"key"`
  9. }
  10. key, err := remote_manager.GetConnectionKey(remote_manager.ConnectionInfo{
  11. TenantId: tenant_id,
  12. })
  13. if err != nil {
  14. return *entities.NewErrorResponse(-500, err.Error())
  15. }
  16. return *entities.NewSuccessResponse(response{
  17. Key: key,
  18. })
  19. }