-
As u/GingaNinja741 mentioned, I think for project structure this project gives you a good idea but there is no real rule here. Some folders like internal are part of the language and will affect imports or usage from other modules. https://github.com/golang-standards/project-layout
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
https://github.com/uber-go/zap for logging. This logger is fast. You might not think that's important, but when we moved from Logrus to Zap we saw a noticeable difference in performance of some high-traffic applications.
-
Do you like an ORM like eloquent for Laravel? Then I can recommend GORM https://gorm.io/
-
bring your own tools - this is where you select your libraries and then wire them together manually. Most libraries play very well with other libraries https://github.com/avelino/awesome-go -- so it can be easier than in other languages. This approach is very common.
-
I'm a big fan of [Twirp RPC](https://github.com/twitchtv/twirp), and [go-chi/chi](https://github.com/go-chi/chi) if I need to provide REST endpoints, authentication or other routing middleware. The "gorilla" set of packages are also useful, I always reach for gorilla/websocket if I need to do some websocket work. You can look at an example service in [go-bridget/notify](https://github.com/go-bridget/notify) - the main files to look at are under rpc/notify/notify.proto/.go, and the implementation which you write is under server/notify. If you'd create database drivers, I'd create a package under server/notify/mysql (for example), and then implement an interface for data retrieval/settings. It's on the todolist, if I'll ever need to implement anything other than JWT, or Redis. Comment if you have any questions or notes.
-
Routing: https://github.com/gorilla/mux
-
Instrumentation: https://github.com/prometheus/client_golang
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
SQL Generation: https://github.com/Masterminds/squirrel
-
Checking for equality in tests: https://github.com/google/go-cmp
-
dockertest
Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.
Integration tests: https://github.com/ory/dockertest
-
For what you are trying to do with micro services I would recommend having a main service and just make your modules folders in that repo. Let's say I make a repo at github.com/uberswe/microservice1 then I might let microservice 2 import the database package defined in microservice1 using github.com/uberswe/microservice1/database
-
validator
:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
I use github.com/go-playground/validator/v10 for validation, and it's simple enough.
-
simple_gopher
Boilerplate for writing Go applications without framework using hexagonal application development approach
-
https://github.com/doug-martin/goqu for building SQL queries. Supports MySQL and Postgres at least - super handy!
-
https://micro.mu/ - a framework based approach that selects the core stuff you need.
-
I'm a big fan of [Twirp RPC](https://github.com/twitchtv/twirp), and [go-chi/chi](https://github.com/go-chi/chi) if I need to provide REST endpoints, authentication or other routing middleware. The "gorilla" set of packages are also useful, I always reach for gorilla/websocket if I need to do some websocket work. You can look at an example service in [go-bridget/notify](https://github.com/go-bridget/notify) - the main files to look at are under rpc/notify/notify.proto/.go, and the implementation which you write is under server/notify. If you'd create database drivers, I'd create a package under server/notify/mysql (for example), and then implement an interface for data retrieval/settings. It's on the todolist, if I'll ever need to implement anything other than JWT, or Redis. Comment if you have any questions or notes.
-
notify
A microservice using Redis to enable a stateful multi-channel notification system (by go-bridget)
I'm a big fan of [Twirp RPC](https://github.com/twitchtv/twirp), and [go-chi/chi](https://github.com/go-chi/chi) if I need to provide REST endpoints, authentication or other routing middleware. The "gorilla" set of packages are also useful, I always reach for gorilla/websocket if I need to do some websocket work. You can look at an example service in [go-bridget/notify](https://github.com/go-bridget/notify) - the main files to look at are under rpc/notify/notify.proto/.go, and the implementation which you write is under server/notify. If you'd create database drivers, I'd create a package under server/notify/mysql (for example), and then implement an interface for data retrieval/settings. It's on the todolist, if I'll ever need to implement anything other than JWT, or Redis. Comment if you have any questions or notes.
-
upper.io/db
Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
upper.io is a viable alternative to GORM. Just a suggestion.
-
Mgo has been unmaintained for years. Use the official https://github.com/mongodb/mongo-go-driver
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives