An open API service indexing awesome lists of open source software.

https://github.com/yizeng/gab

Gab (Go API Boilerplates) is a set of boilerplates to spin up Go APIs quickly.
https://github.com/yizeng/gab

boilerplates go golang golang-examples templates

Last synced: 7 months ago
JSON representation

Gab (Go API Boilerplates) is a set of boilerplates to spin up Go APIs quickly.

Awesome Lists containing this project

README

          


Gab (Go API Boilerplates)

[WIP] A set of boilerplates to spin up Go APIs quickly.

[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
![Tests](https://github.com/yizeng/gab/actions/workflows/test.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/yizeng/gab/graph/badge.svg?token=MIC6dQC41V)](https://codecov.io/gh/yizeng/gab)


## How to Use?

All boilerplates are grouped by their API frameworks,
like `chi` for services using [go-chi/chi][go-chi/chi]
and `gin` for services built on [gin-gonic/gin][gin-gonic/gin].

Then each sub-folder contains a boilerplate that can spin up an API service.

For example, `minimum` folder contains a minimalistic Go service with 1 example API endpoint.
`crud-gorm` contains a basic CRUD API with [GORM][go-gorm/gorm].

- /chi
- [/minimum](./chi/minimum)
- [/gorm](./chi/gorm)
- [/auth-jwt](./chi/gorm/auth-jwt)
- [/crud](./chi/gorm/crud)
- [/wip-complete](./chi/gorm/wip-complete) (trying to have everything, but work in progress)
- /crud-cached
- /sqlc
- ...
- /gin
- [/minimum](./gin/minimum)
- [/gorm](./gin/gorm)
- [/auth-jwt](./gin/gorm/auth-jwt)
- [/crud](./gin/gorm/crud)
- [/wip-complete](./gin/gorm/wip-complete) (trying to have everything, but work in progress)
- /crud-cached
- /sqlc
- ...
- ...

## How to Run?

Each boilerplate can be booted up either

- natively with Go installed locally (assuming dependencies like PostgresSQL, Redis, etc. also exist)
- or by Docker Compose (PostgreSQL, Redis, etc. are included out of the box)

Please refer to their `README.md` for details.

[go-chi/chi]: https://github.com/go-chi/chi
[gin-gonic/gin]: https://github.com/gin-gonic/gin
[go-gorm/gorm]: https://github.com/go-gorm/gorm