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"
|
2025-02-21 17:05:37 +00:00
|
|
|
"queryorchestration/internal/document"
|
2025-08-05 07:03:35 -07:00
|
|
|
documentbatch "queryorchestration/internal/document/batch"
|
2025-05-27 15:28:46 +00:00
|
|
|
documentupload "queryorchestration/internal/document/upload"
|
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-01-15 19:45:51 +00:00
|
|
|
"queryorchestration/internal/query"
|
2025-02-11 15:22:59 +00:00
|
|
|
querytest "queryorchestration/internal/query/test"
|
2025-02-14 10:56:24 +00:00
|
|
|
queryupdate "queryorchestration/internal/query/update"
|
2025-07-11 19:27:14 +00:00
|
|
|
"queryorchestration/internal/serviceconfig/auth"
|
2025-08-06 15:06:18 -07:00
|
|
|
"queryorchestration/internal/serviceconfig/objectstore"
|
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
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
type Services struct {
|
2025-11-26 19:23:42 +00:00
|
|
|
Export *export.Service
|
|
|
|
|
Collector *collector.Service
|
|
|
|
|
CollectorSet *collectorset.Service
|
|
|
|
|
Query *query.Service
|
|
|
|
|
QueryUpdate *queryupdate.Service
|
|
|
|
|
QueryTest *querytest.Service
|
|
|
|
|
Client *client.Service
|
|
|
|
|
ClientUpdate *clientupdate.Service
|
|
|
|
|
Document *document.Service
|
|
|
|
|
DocumentUpload *documentupload.Service
|
|
|
|
|
DocumentBatch *documentbatch.Service
|
|
|
|
|
FieldExtraction *fieldextraction.Service
|
|
|
|
|
Folder *folder.Service
|
|
|
|
|
Label *label.Service
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-08-06 15:06:18 -07:00
|
|
|
// ConfigProvider combines auth and objectstore interfaces for the Controllers
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|