Skip to content
/ base-api-go Public template

This is an example API, built with Go and Iris. The codebase was created to show a working backend application in Go, with different options of database clients.

License

Notifications You must be signed in to change notification settings

un-versed/base-api-go

Repository files navigation

gopherbadger-tag-do-not-edit

Go + Iris - Base API

This is an example API, built with Go and Iris. The codebase was created to show a working backend application in Go, with different options of database clients.

Table of Contents

  1. How it works
  2. Getting started
  3. Additional

How it works

The repository is organized in 3 different branches:

  • master
  • bun
  • pgx
  • sqlx

master

The master branch contains only the file structres and example controllers. No DB, just the Iris framework.

Iris is a fast, simple yet fully featured and very efficient web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website or API.

Simple and performant DB client for PostgreSQL, MySQL, and SQLite.

pgx is a pure Go driver and toolkit for PostgreSQL.

sqlx is a library which provides a set of extensions on go's standard database/sql library.

Getting started

Running for development

make run

Building the app

Building just for current OS

make build

Buiding for multiple distributions

make build-all

Testing the app

make test

Additional

Generating coverage in HTML

make cover-html

Generating badge

Everytime you call make test or make cover-html, the badge in README.md gets updated, but you can do it manually:

make badge

Cleaning the repo

make clean

Feel free to contribute.

The logo is from @ashleymcnamara and can be found here.

Made with ❤ in Brazil.

About

This is an example API, built with Go and Iris. The codebase was created to show a working backend application in Go, with different options of database clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published