go-starter

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2022 License: BSD-2-Clause

README

Go Starter

This template can be used as a starting point for developing modern web services in Go.

Features

  • Business logic decoupled via domain in internal directory
  • Dependency injection employed to make testing easier
  • Environment-specific configuration files in config directory
  • Auto-generated OpenAPI docs by running make docs
  • Ent, a rich, type-safe ORM that supports auto-migrations

Prerequisites

Running locally

Set up dependencies
make compose-up
Run API server
make run

Server will be live now on http://localhost:8080
Swagger API documentation will be live on http://localhost:8080/swagger/index.html

Tear down dependencies
make compose-down

Generate ent code

make ent

Click here to find more about ent

Run tests

make test

Directories

Path Synopsis
cmd
app command
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
ent
internal
health/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg
httpserver
Package httpserver implements HTTP server.
Package httpserver implements HTTP server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL