debugging.go 629 B

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