72de690894
Chatbot functionality * baseline working * missing test file * more tests
67 lines
2.2 KiB
Go
67 lines
2.2 KiB
Go
package queryapi
|
|
|
|
import (
|
|
"queryorchestration/internal/backgroundtask"
|
|
"queryorchestration/internal/bot"
|
|
"queryorchestration/internal/client"
|
|
clientupdate "queryorchestration/internal/client/update"
|
|
"queryorchestration/internal/collector"
|
|
collectorset "queryorchestration/internal/collector/set"
|
|
"queryorchestration/internal/customschema"
|
|
"queryorchestration/internal/document"
|
|
documentbatch "queryorchestration/internal/document/batch"
|
|
documentdownload "queryorchestration/internal/document/download"
|
|
documentupload "queryorchestration/internal/document/upload"
|
|
"queryorchestration/internal/eula"
|
|
"queryorchestration/internal/export"
|
|
"queryorchestration/internal/fieldextraction"
|
|
"queryorchestration/internal/folder"
|
|
"queryorchestration/internal/label"
|
|
"queryorchestration/internal/serviceconfig/auth"
|
|
"queryorchestration/internal/serviceconfig/objectstore"
|
|
"queryorchestration/internal/uisettings"
|
|
)
|
|
|
|
const Name = "queryAPI"
|
|
|
|
// Services contains all service dependencies for the API controllers.
|
|
// Query-related services have been removed - see remove_query_plan.md.
|
|
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
|
|
}
|
|
|
|
// ConfigProvider combines auth, objectstore, and background runner for the Controllers.
|
|
// Database access is intentionally excluded; controllers use the service layer.
|
|
type ConfigProvider interface {
|
|
auth.ConfigProvider
|
|
objectstore.ConfigProvider
|
|
GetBackgroundRunner() *backgroundtask.Runner
|
|
}
|
|
|
|
type Controllers struct {
|
|
svc *Services
|
|
cfg ConfigProvider
|
|
}
|
|
|
|
func NewControllers(services *Services, cfg ConfigProvider) *Controllers {
|
|
return &Controllers{
|
|
svc: services,
|
|
cfg: cfg,
|
|
}
|
|
}
|