go-echo-realworld

module
v0.0.0-...-ada90c4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT

README

Golang Clean Architecture

This is an example of implementation of Real World Application backend-specs

🔥 Layers of Domain

The diagram:

golang clean architecture

🦄 TO DO :

  • Application
    • Go-Standards Project Layout
    • Environment Variable Configuration
    • Health-Check and Debug API
    • Graceful Shutdown
  • Layered architecture
  • HTTP Server
    • Echo framework
    • Server Side Caching
      • Cache but revalidate (Header Cache-Control: no-cache)
      • Set Expiration Time (Header Cache-Control: max-age=120)
    • Request ID in logger (Header X-Request-Id: xxx)
  • RESTful
    • Create Resource (POST verb)
    • Update Resource (PUT verb)
    • Partially Update Resource (PATCH verb)
    • Find Resource (GET verb)
      • Offset Pagination (Query param ?limit=10&page=1)
      • Sorting (Query param ?sort=fullname DESC,id DESC)
  • Testing
    • Table Driven Test
    • Mocking
  • Others
    • Database migration and seed tool
    • Releaser

🏗️ How To Run

setup environment and running on local

make run    # Start the database, run migrations, and start the application locally

✨ References

Golang:

🛡️ License

This project is licensed under the MIT License.

Directories

Path Synopsis
internal
app
users/mock
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg

Jump to

Keyboard shortcuts

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