Merged in feature/docresult (pull request #105)
Document Result Endpoint * testing * cleantesting * progress * query * lint * readme * dockerclient * api * passtest * tests * test
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
"log/slog"
|
||||
"os"
|
||||
|
||||
queryservice "queryorchestration/api/queryService"
|
||||
queryapi "queryorchestration/api/queryAPI"
|
||||
"queryorchestration/internal/client"
|
||||
"queryorchestration/internal/collector"
|
||||
collectorset "queryorchestration/internal/collector/set"
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
"queryorchestration/internal/query/result"
|
||||
querytest "queryorchestration/internal/query/test"
|
||||
queryupdate "queryorchestration/internal/query/update"
|
||||
service "queryorchestration/internal/server/service"
|
||||
"queryorchestration/internal/server/api"
|
||||
"queryorchestration/internal/serviceconfig/queue/clientsync"
|
||||
"queryorchestration/internal/serviceconfig/queue/queryversionsync"
|
||||
|
||||
@@ -37,8 +37,8 @@ import (
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
type QueryServiceConfig struct {
|
||||
service.BaseConfig
|
||||
type QueryAPIConfig struct {
|
||||
api.BaseConfig
|
||||
clientsync.ClientSyncConfig
|
||||
queryversionsync.QueryVersionSyncConfig
|
||||
}
|
||||
@@ -46,7 +46,7 @@ type QueryServiceConfig struct {
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
cfg := &QueryServiceConfig{}
|
||||
cfg := &QueryAPIConfig{}
|
||||
|
||||
cfg.RegisterHandlersFunc = func() (*openapi3.T, error) {
|
||||
exp := export.New()
|
||||
@@ -69,7 +69,7 @@ func main() {
|
||||
Query: que,
|
||||
})
|
||||
|
||||
services := &queryservice.Services{
|
||||
services := &queryapi.Services{
|
||||
Export: exp,
|
||||
Collector: col,
|
||||
CollectorSet: colupdate,
|
||||
@@ -80,11 +80,11 @@ func main() {
|
||||
Document: doc,
|
||||
}
|
||||
|
||||
cons := queryservice.NewControllers(cfg.GetValidator(), services)
|
||||
cons := queryapi.NewControllers(cfg.GetValidator(), services)
|
||||
|
||||
queryservice.RegisterHandlers(cfg.Router, cons)
|
||||
queryapi.RegisterHandlers(cfg.Router, cons)
|
||||
|
||||
swagger, err := queryservice.GetSwagger()
|
||||
swagger, err := queryapi.GetSwagger()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error loading swagger: %s", err)
|
||||
}
|
||||
@@ -92,7 +92,7 @@ func main() {
|
||||
return swagger, nil
|
||||
}
|
||||
|
||||
server, err := service.New(ctx, cfg)
|
||||
server, err := api.New(ctx, cfg)
|
||||
if err != nil {
|
||||
slog.Error(err.Error())
|
||||
os.Exit(1)
|
||||
Reference in New Issue
Block a user