Skip to content
Open
17 changes: 9 additions & 8 deletions cmd/port-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"syscall"
"time"

"github.com/evt/port-api/config"
"github.com/evt/port-api/internal/app"
"github.com/evt/port-api/internal/app/ui"
"github.com/evt/port-api/internal/config"
"github.com/evt/port-api/internal/repository/inmem"
"github.com/evt/port-api/internal/services"
"github.com/evt/port-api/internal/transport"
"github.com/gorilla/mux"
)

Expand All @@ -26,14 +27,14 @@ func run() error {
// read config from env
cfg := config.Read()

// default context
ctx := context.Background()
// create port repository
portStoreRepo := inmem.NewPortStore()

// create application
application := app.New(ctx)
// create port service
portService := services.NewPortService(portStoreRepo)

// create http server with application injected
httpServer := ui.NewHttpServer(application)
httpServer := transport.NewHttpServer(portService)

// create http router
router := mux.NewRouter()
Expand Down
20 changes: 0 additions & 20 deletions internal/app/adapters/model.go

This file was deleted.

109 changes: 0 additions & 109 deletions internal/app/adapters/port_store_inmem.go

This file was deleted.

73 changes: 0 additions & 73 deletions internal/app/adapters/port_store_inmem_test.go

This file was deleted.

46 changes: 0 additions & 46 deletions internal/app/app.go

This file was deleted.

36 changes: 0 additions & 36 deletions internal/app/command/create_or_update_port.go

This file was deleted.

35 changes: 0 additions & 35 deletions internal/app/command/create_or_update_port_integration_test.go

This file was deleted.

27 changes: 0 additions & 27 deletions internal/app/query/count_ports.go

This file was deleted.

Loading