2024-12-23 16:01:54 +00:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2024-12-24 17:13:48 +00:00
|
|
|
"queryorchestration/api/grpc/spec"
|
|
|
|
|
"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 {
|
|
|
|
|
spec.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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *ExportController) Trigger(ctx context.Context, req *spec.ExportTrigger) (*spec.IdMessage, error) {
|
|
|
|
|
return &spec.IdMessage{}, nil
|
|
|
|
|
}
|