package clientsyncrunner import ( "context" "log/slog" clientsync "queryorchestration/internal/client/sync" "github.com/go-playground/validator/v10" ) const Name = "clientSyncRunner" type Services struct { ClientSync *clientsync.Service } type Runner struct { validator *validator.Validate svc *Services } func New(validator *validator.Validate, svc *Services) Runner { return Runner{ validator: validator, svc: svc, } } type Body struct { ClientID string `json:"id" validate:"required"` } func (s *Runner) Process(ctx context.Context, body Body) bool { err := s.svc.ClientSync.Sync(ctx, body.ClientID) if err != nil { slog.Error("unable to process", "error", err) return false } return true }