15adaebfcd
DRAFT PR : WIP working through ideas for integration * movearound * attempttwo * openapi * further sanding * fix * start on tests * runthroughsingleconfig * somechanges * reflectissue * removeerrs * mostlyremovepanic * removeenv * noncfgtests * go * repo * fix service config test * add PWD to all * test fix * fix lint * todo for later * passingunittests * alltests * testlogger * testloggername * clean
38 lines
903 B
Go
38 lines
903 B
Go
package query
|
|
|
|
import (
|
|
"queryorchestration/internal/document"
|
|
documenttext "queryorchestration/internal/document/text"
|
|
"queryorchestration/internal/job/collector"
|
|
"queryorchestration/internal/query/result"
|
|
"queryorchestration/internal/serviceconfig"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Services struct {
|
|
Text *documenttext.Service
|
|
Result *result.Service
|
|
Collector *collector.Service
|
|
Document *document.Service
|
|
}
|
|
|
|
type Service struct {
|
|
cfg serviceconfig.ConfigProvider
|
|
svc *Services
|
|
}
|
|
|
|
func New(cfg serviceconfig.ConfigProvider, svc *Services) *Service {
|
|
return &Service{
|
|
cfg,
|
|
svc,
|
|
}
|
|
}
|
|
|
|
type Document struct {
|
|
ID uuid.UUID `json:"id" validate:"required,uuid"`
|
|
JobID uuid.UUID `json:"jobId" validate:"required,uuid"`
|
|
CleanVersion int32 `json:"cleanVersion" validate:"required,gt=0"`
|
|
TextVersion int32 `json:"textVersion" validate:"required,gt=0"`
|
|
}
|