2024-12-23 16:01:54 +00:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2025-01-07 13:01:14 +00:00
|
|
|
serviceinterfaces "queryorchestration/api/serviceInterfaces"
|
2024-12-24 17:13:48 +00:00
|
|
|
"queryorchestration/internal/export"
|
2024-12-23 16:49:53 +00:00
|
|
|
|
|
|
|
|
"github.com/go-playground/validator/v10"
|
2024-12-23 16:01:54 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type ExportController struct {
|
2025-01-07 13:01:14 +00:00
|
|
|
serviceinterfaces.UnimplementedExportServiceServer
|
2024-12-23 16:49:53 +00:00
|
|
|
export export.Service
|
|
|
|
|
validator *validator.Validate
|
2024-12-23 16:01:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-23 16:49:53 +00:00
|
|
|
func NewExportController(exportSvc export.Service, validator *validator.Validate) *ExportController {
|
2024-12-23 16:01:54 +00:00
|
|
|
return &ExportController{
|
2024-12-23 16:49:53 +00:00
|
|
|
export: exportSvc,
|
|
|
|
|
validator: validator,
|
2024-12-23 16:01:54 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-07 13:01:14 +00:00
|
|
|
func (s *ExportController) Trigger(ctx context.Context, req *serviceinterfaces.ExportTrigger) (*serviceinterfaces.IdMessage, error) {
|
|
|
|
|
return &serviceinterfaces.IdMessage{}, nil
|
2024-12-23 16:01:54 +00:00
|
|
|
}
|