Files
query-orchestration/api/controllers/jobcollector.go
T

37 lines
1.1 KiB
Go
Raw Normal View History

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/collector"
2024-12-23 16:01:54 +00:00
2024-12-23 16:49:53 +00:00
"github.com/go-playground/validator/v10"
2024-12-23 16:01:54 +00:00
"google.golang.org/protobuf/types/known/emptypb"
)
type JobCollectorController struct {
2025-01-07 13:01:14 +00:00
serviceinterfaces.UnimplementedJobCollectorServiceServer
2024-12-23 16:01:54 +00:00
collector collector.Service
2024-12-23 16:49:53 +00:00
validator *validator.Validate
2024-12-23 16:01:54 +00:00
}
2024-12-23 16:49:53 +00:00
func NewJobCollectorController(collSvc collector.Service, validator *validator.Validate) *JobCollectorController {
2024-12-23 16:01:54 +00:00
return &JobCollectorController{
collector: collSvc,
2024-12-23 16:49:53 +00:00
validator: validator,
2024-12-23 16:01:54 +00:00
}
}
2025-01-07 13:01:14 +00:00
func (s *JobCollectorController) Get(ctx context.Context, req *serviceinterfaces.IdMessage) (*serviceinterfaces.JobCollector, error) {
return &serviceinterfaces.JobCollector{}, nil
2024-12-23 16:01:54 +00:00
}
2025-01-07 13:01:14 +00:00
func (s *JobCollectorController) Create(ctx context.Context, req *serviceinterfaces.JobCollectorCreate) (*serviceinterfaces.IdMessage, error) {
return &serviceinterfaces.IdMessage{}, nil
2024-12-23 16:01:54 +00:00
}
2025-01-07 13:01:14 +00:00
func (s *JobCollectorController) Update(ctx context.Context, req *serviceinterfaces.JobCollectorUpdate) (*emptypb.Empty, error) {
2024-12-23 16:01:54 +00:00
return &emptypb.Empty{}, nil
}