
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
gitlab.com/algoru/spent-tracking-api
This project is a production-ready example of how you should structure your hexagonal-architecture GoLang projects.
spent-tracking-api <------ This is your awesome project.
├───domain
│ └───entity <------ Here is where your business inmutable entities lives
├───infrastructure <------ Here is where all your external infrastructure implementation (web framework, database engine, etc) lives.
│ └───adapters <------ Here you split in packages which kind of adapters (or implementation) are you writing.
│ ├───rest <------ For example, REST implementations.
│ │ ├───ginserver <------ For example, a Gin-Gonic implementation.
│ │ └───port.go <------ Here is where you define which methods your REST adapters must implements.
│ └───storage <------ Here is where your storage implementations (or adapters) lives.
│ ├───mariadb <------ For example, a MariaDB/MySQL adapter.
│ └───port.go <------ Here is where you define which methods should your storage adapters must implement.
├───repository <------ Here is where your business entities looks at a storage/database level.
│ ├───tag
│ └───transaction
└───service <------ Here is where you define which services your application can serve. Not to be confused with web services.
├───tag
└───transaction
I recommend FlyWay.
For MySQL/MariaDB:
$ flyway -url=jdbc:(mysql|mariadb)://<host>:<port>/<database> -user=<db user> -password=<user password> -locations=filesystem:./migrations/mariadb migrate
For SQLite:
$ flyway -url=jdbc:sqlite:<database>.db -user=<db user> -password=<user password> -locations=filesystem:./migrations/sqlite migrate
Álvaro Stagg alvarostagg@protonmail.com
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.