Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khachikastoyan/go-api-template
A small template for creating go http services
https://github.com/khachikastoyan/go-api-template
api golang postgresql rest-api
Last synced: 22 days ago
JSON representation
A small template for creating go http services
- Host: GitHub
- URL: https://github.com/khachikastoyan/go-api-template
- Owner: KhachikAstoyan
- Created: 2024-11-21T05:11:39.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-21T08:42:32.000Z (3 months ago)
- Last Synced: 2024-11-21T09:31:29.200Z (3 months ago)
- Topics: api, golang, postgresql, rest-api
- Language: Go
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### A simple template for myself for scaffolding go services
I created this simple template thing so that it's easier to create new Go HTTP services from scratch, because often times I end up repeating myself.
#### What does this template use?
- Go (obviously)
- Chi (for routing)
- sqlc (compiling queries to go code)
- PostgreSQL
- Some other minor libs for convenience#### Directory Structure
- `core` contains the core things, like configuration and global App struct
- `db` contains DDL statements, queries, and the generated repository
- `dtos` are self explanatory
- `http` contains http handlers (controllers)
- `services` have different services as singletons, that talk to the database through the generated repository