Skip to content

csg33k/golug

Repository files navigation

What is This?

The purpose of this repo is to show case a really basic REST Crud service.

Why are you using X / doing Y / Whyyyyyyy ?

Cause I want to. They're all opinionated choices and not the best or worst but should work for the use case I'm presenting.

License: I like MIT license, feel free to use anything you like.

Logging:

Logrus I like it since it's simple to setup and requires basically no configuration.

Database:

PostgresSQL Same, I'm more familiar with it than MySQL. It's more SQL standard compliant and more feature rich. Also, just simply cause I want to.

Chi GoLang router. I've been meaning to look at this for a while so this is a good excuse. Therefore, I'm embracing my inner Chi.

Viper At this point it feels silly not to use this. It supports, YAML, JSON, ini, hcl, toml, javaproperties, ENV overrides.

More DataBase Opinions:

DBMate Schema management, requires more writing of raw sql, but I'm a bit fan of Schema first design, so there we go.

SQLC ORM that generates data models.

SQLX An extension that allows for data-mapping queries into structs

Install Packages

##Needed for code generation
go install github.com/amacneil/dbmate.git@latest
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest

See quickguide for more.

About

GoLug Presentation Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published