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

67 lines
2.2 KiB
Go
Raw Normal View History

package queryapi
2025-01-15 19:45:51 +00:00
import (
"queryorchestration/internal/backgroundtask"
"queryorchestration/internal/bot"
2025-01-21 18:24:14 +00:00
"queryorchestration/internal/client"
2025-04-22 19:57:35 +00:00
clientupdate "queryorchestration/internal/client/update"
"queryorchestration/internal/collector"
collectorset "queryorchestration/internal/collector/set"
"queryorchestration/internal/customschema"
"queryorchestration/internal/document"
2025-08-05 07:03:35 -07:00
documentbatch "queryorchestration/internal/document/batch"
documentdownload "queryorchestration/internal/document/download"
documentupload "queryorchestration/internal/document/upload"
"queryorchestration/internal/eula"
2025-01-15 19:45:51 +00:00
"queryorchestration/internal/export"
"queryorchestration/internal/fieldextraction"
"queryorchestration/internal/folder"
"queryorchestration/internal/label"
"queryorchestration/internal/serviceconfig/auth"
2025-08-06 15:06:18 -07:00
"queryorchestration/internal/serviceconfig/objectstore"
"queryorchestration/internal/uisettings"
2025-01-15 19:45:51 +00:00
)
const Name = "queryAPI"
// 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 {
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
CustomSchema *customschema.Service
Folder *folder.Service
Label *label.Service
Eula *eula.Service
Bot *bot.Service
2025-01-15 19:45:51 +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
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
}
}