README ¶ myply Server This is a repository for myply server spec Go 1.18 or later, to use generics wire for Dependency injection wire mocking test example Fiber web framework Hexagonal arch Youtube data api Ginkgo for BDD GCP local pre-commit $ cp pre-commit.example .git/hooks/pre-commit $ chmod +x .git/hooks/pre-commit setup make setup run $ make local GO111MODULE=on go run ./application/cmd/main.go ┌───────────────────────────────────────────────────┐ │ Fiber v2.34.1 │ │ http://127.0.0.1:3000 │ │ (bound on host 0.0.0.0 and port 3000) │ │ │ │ Handlers ............. 2 Processes ........... 1 │ │ Prefork ....... Disabled PID ............. 11610 │ └───────────────────────────────────────────────────┘ # 127.0.0.1:8080/swagger/index.html docker $ make docker.fiber prod https://myply-server-rwwy3wj4sa-du.a.run.app https://myply-server-rwwy3wj4sa-du.a.run.app/swagger directory structure ├── application // Interface layer and Application Services in hexagonal architecture │ ├── cmd // command line interface │ ├── controller // http controller │ ├── middleware // http middleware, it can wrap errors or set request uuid or jwt authorization │ └── routes // http router ├── domain // domain layer │ ├── entity │ ├── repository // same as Port in hexagonal architecture │ ├── service // domain service layer │ └── vo // value object ├── go.mod ├── infrastructure // infrastructure layer in hexagonal │ ├── clients // external APIs (E.g. google client, firebase client ..) │ ├── configs // configuration of fiber app │ ├── logger │ └── persistence // Impl of /domain/repository interface, database persistence layer(E.g. mysql, postgreSQL, mongo, redis ..) └── pre-commit.example // go fmt before commit /application: https://github.com/Sairyss/domain-driven-hexagon#application-layer ** Note that cmd does not represent CQRS's Command. (It's different, cmd just represents command line interface) /doamin: https://github.com/Sairyss/domain-driven-hexagon#domain-layer /infrastructure: https://github.com/Sairyss/domain-driven-hexagon#infrastructure-layer uml refs unit test guide: fiber/app_test.go fiber recipes related to youtube api Unofficial youtube music library Electron wrapper around YouTube Music It also supports music streaming Expand ▾ Collapse ▴ Directories ¶ Show internal Expand all Path Synopsis application cmd command controller middleware router docs Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag domain member memos musics tag infrastructure clients configs logger persistence persistence/cache persistence/data persistence/db persistence/static Click to show internal directories. Click to hide internal directories.