2025-03-17 18:14:15 +00:00
|
|
|
package queryapi
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
import (
|
2025-08-20 19:01:13 +00:00
|
|
|
"queryorchestration/internal/backgroundtask"
|
2025-01-21 18:24:14 +00:00
|
|
|
"queryorchestration/internal/client"
|
2025-04-22 19:57:35 +00:00
|
|
|
clientupdate "queryorchestration/internal/client/update"
|
2025-03-10 11:03:00 +00:00
|
|
|
"queryorchestration/internal/collector"
|
2025-03-10 13:00:57 +00:00
|
|
|
collectorset "queryorchestration/internal/collector/set"
|
2026-04-16 23:11:26 +00:00
|
|
|
"queryorchestration/internal/customschema"
|
2025-02-21 17:05:37 +00:00
|
|
|
"queryorchestration/internal/document"
|
2025-08-05 07:03:35 -07:00
|
|
|
documentbatch "queryorchestration/internal/document/batch"
|
2026-03-17 17:06:57 +00:00
|
|
|
documentdownload "queryorchestration/internal/document/download"
|
2025-05-27 15:28:46 +00:00
|
|
|
documentupload "queryorchestration/internal/document/upload"
|
2026-01-22 18:17:27 +00:00
|
|
|
"queryorchestration/internal/eula"
|
2025-01-15 19:45:51 +00:00
|
|
|
"queryorchestration/internal/export"
|
2025-11-26 19:23:42 +00:00
|
|
|
"queryorchestration/internal/fieldextraction"
|
|
|
|
|
"queryorchestration/internal/folder"
|
|
|
|
|
"queryorchestration/internal/label"
|
2025-07-11 19:27:14 +00:00
|
|
|
"queryorchestration/internal/serviceconfig/auth"
|
2025-08-06 15:06:18 -07:00
|
|
|
"queryorchestration/internal/serviceconfig/objectstore"
|
2026-03-04 23:00:50 +00:00
|
|
|
"queryorchestration/internal/uisettings"
|
2025-01-15 19:45:51 +00:00
|
|
|
)
|
|
|
|
|
|
2025-03-17 18:14:15 +00:00
|
|
|
const Name = "queryAPI"
|
2025-02-03 17:30:50 +00:00
|
|
|
|
2026-01-14 17:59:04 +00:00
|
|
|
// Services contains all service dependencies for the API controllers.
|
|
|
|
|
// Query-related services have been removed - see remove_query_plan.md.
|
2025-01-15 19:45:51 +00:00
|
|
|
type Services struct {
|
2026-03-17 17:06:57 +00:00
|
|
|
Export *export.Service
|
|
|
|
|
Collector *collector.Service
|
|
|
|
|
CollectorSet *collectorset.Service
|
|
|
|
|
Client *client.Service
|
|
|
|
|
ClientUpdate *clientupdate.Service
|
|
|
|
|
Document *document.Service
|
|
|
|
|
DocumentUpload *documentupload.Service
|
|
|
|
|
DocumentDownload *documentdownload.Service
|
|
|
|
|
DocumentBatch *documentbatch.Service
|
|
|
|
|
UISettings *uisettings.Service
|
|
|
|
|
FieldExtraction *fieldextraction.Service
|
2026-04-16 23:11:26 +00:00
|
|
|
CustomSchema *customschema.Service
|
2026-03-17 17:06:57 +00:00
|
|
|
Folder *folder.Service
|
|
|
|
|
Label *label.Service
|
|
|
|
|
Eula *eula.Service
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-04 23:00:50 +00:00
|
|
|
// ConfigProvider combines auth, objectstore, and background runner for the Controllers.
|
|
|
|
|
// Database access is intentionally excluded; controllers use the service layer.
|
2025-08-06 15:06:18 -07:00
|
|
|
type ConfigProvider interface {
|
|
|
|
|
auth.ConfigProvider
|
|
|
|
|
objectstore.ConfigProvider
|
2025-08-20 19:01:13 +00:00
|
|
|
GetBackgroundRunner() *backgroundtask.Runner
|
2025-08-06 15:06:18 -07:00
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
type Controllers struct {
|
2025-08-06 15:06:18 -07:00
|
|
|
svc *Services
|
|
|
|
|
cfg ConfigProvider
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-08-06 15:06:18 -07:00
|
|
|
func NewControllers(services *Services, cfg ConfigProvider) *Controllers {
|
2025-01-15 19:45:51 +00:00
|
|
|
return &Controllers{
|
2025-08-06 15:06:18 -07:00
|
|
|
svc: services,
|
|
|
|
|
cfg: cfg,
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
}
|