Skip to content

evt/rest-api-example

Repository files navigation

Github CI/CD Go Report Repository Top Language Scrutinizer Code Quality GitHub go.mod Go version Codacy Grade Github Repository Size Github Open Issues Lines of code License GitHub release (latest by date) GitHub last commit GitHub contributors Simply the best ;)

REST API Server example

Ladies and gentlemen, once upon a time I asked a candidate for Golang Junior Developer position to create a simple Golang REST API server doing something useful (anything useful).

I won't show his code here :) But as a result I realized I don't have my answer to this question :) So, here it is!

This is Golang REST API server example including the following features:

  • based on high performance, extensible, minimalist Go web framework - Echo - https://echo.labstack.com
  • made with Clean Architecture in mind (controller -> service -> repository)
  • has services that work with both PostgreSQL/MySQL database (user/file metadata CRUD) and Google Cloud Storage (file upload/download)
  • includes service & controller go tests based on database mocks auto-generated with go:generate and mockery (https://github.com/vektra/mockery)
  • Postman tests included aswell
  • config based on envconfig (https://github.com/kelseyhightower/envconfig)
  • made relatively fast :) but with ❤️ :)

About

REST API server made with clean architecture.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages