Refactored the application structure to better separate concerns between files and packages
Some checks failed
ci/woodpecker/push/build-image Pipeline failed

This commit is contained in:
2026-03-20 09:44:53 -05:00
parent 8deb4fd12e
commit bb18bcfb15
41 changed files with 1445 additions and 1086 deletions

View File

@@ -1,3 +1,5 @@
// main.go wires configuration, dependencies, and HTTP runtime startup.
// Layer: cmd/weatherapi executable composition root.
package main
import (
@@ -15,7 +17,7 @@ import (
"gitea.maximumdirect.net/ejr/feedapi/db"
httpapi "gitea.maximumdirect.net/ejr/weatherapi/internal/adapters/inbound/httpapi"
wfpq "gitea.maximumdirect.net/ejr/weatherapi/internal/adapters/outbound/postgres"
"gitea.maximumdirect.net/ejr/weatherapi/internal/core"
"gitea.maximumdirect.net/ejr/weatherapi/internal/app"
_ "github.com/lib/pq"
)
@@ -60,7 +62,7 @@ func run(ctx context.Context, cfgPath string) error {
}
repo := wfpq.NewRepository(primary)
svc := core.NewService(repo)
svc := app.NewService(repo)
defs := httpapi.Definitions(svc)
a, err := feedapp.New(cfg,