Skip to content

Golang HTTP API Boilerplate using REST and Hexagonal architectural style and SOLID design principles 🚀

License

Notifications You must be signed in to change notification settings

jwzk/go-http-api-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-HTTP-API-Boilerplate

Golang HTTP API Boilerplate using REST and Hexagonal architectural style and SOLID design principles.

Requirements

Development requirements

Install the mockery tool:

$ go install github.com/vektra/mockery/v2@latest

Project architecture

The project is built on top of this structure:

  • cmd: Application main
  • internal: Private application
    • adapter: Adapter layer
      • dao: Data access object layer
      • http: HTTP layer
    • domain: Domain business layer
      • model: Entity layer
      • port: Interface adapter layer
      • usecase: Application business rules layer
  • pkg: External library code

Local setup

Diplay make commands with:

$ make help

Run Go API with:

$ make run

Run Docker project with:

$ make start

Run tests with:

$ make test

Generate mocks with:

$ mockery

Access to your local service:

  • HTTP API on port :4100

About

Golang HTTP API Boilerplate using REST and Hexagonal architectural style and SOLID design principles 🚀

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published