https://github.com/rus-sharafiev/go-rest-common
Common services for the REST service
https://github.com/rus-sharafiev/go-rest-common
golang rest-api
Last synced: about 1 year ago
JSON representation
Common services for the REST service
- Host: GitHub
- URL: https://github.com/rus-sharafiev/go-rest-common
- Owner: rus-sharafiev
- License: mit
- Created: 2024-03-25T11:58:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T13:06:24.000Z (over 2 years ago)
- Last Synced: 2024-04-17T19:26:03.281Z (about 2 years ago)
- Topics: golang, rest-api
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Common services for the [REST service](https://github.com/rus-sharafiev/go-rest)
The module includes the following packages:
- db
> PostgreSQL instance, instance creator and custom methods (based on the [pgx driver](https://github.com/jackc/pgx))
- exception
> a set of functions that write JSON encoded errors to `http.ResponseWriter`
- formdata
> Middleware that saves files and "restore" JSON (requires [custom FormData converter](https://github.com/rus-sharafiev/fetch-api) on frontend)
- jwt
> Generates and validates JWT (based on [jwt-go](https://github.com/golang-jwt/jwt))
- mail
> Some basic functions to send a mail using `net/smtp`
- spa
> `http.Handler` for serving SPA and static files
- uploads
> `http.Handler` for serving uploads protected by access token.