Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/belak/toolkit
A small, opinionated, modular toolkit for writing http services in Go
https://github.com/belak/toolkit
Last synced: about 2 months ago
JSON representation
A small, opinionated, modular toolkit for writing http services in Go
- Host: GitHub
- URL: https://github.com/belak/toolkit
- Owner: belak
- License: mit
- Created: 2020-09-30T17:26:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T00:04:55.000Z (almost 2 years ago)
- Last Synced: 2024-10-19T05:51:31.858Z (3 months ago)
- Language: Go
- Size: 22.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# toolkit
A small, opinionated, modular toolkit for writing http services in GoGo 1.16 or above is required because of the usage of embed.FS.
## Packages
Each package is named so it doesn't conflict with the stdlib packages with
similar features. It should be possible to use only these packages to build
services as they wrap libraries to expose a more ergonomic interface.- db - Mostly a wrapper around jmoiron/sqlx and golang-migrate. It only exposes
interfaces which take a `context.Context` to ensure people are thinking about
timeouts.
- web - A wrapper around a number of packages to provide a convenient
one-stop-shop for interfacing with http services. It wraps net/http,
encoding/json, and formam. You must choose a router to use. go-chi/chi
is the author's current recommended choice.Package ideas:
- Logging - I don't know what this would be called or what it would look like
yet, so it's on the backburner for now.Feature ideas:
- db
- Migrations. Either using golang-migrate, or a custom solution.
- web
- Routing. Provide a useful router which works well with the included
handlers.