droplets

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: MIT Imports: 15 Imported by: 0

README

WIP

droplets

GoDoc Go Report Card FOSSA Status

A platform for Gophers similar to the awesome Golang News.

Why?

Droplets is NOT built because there is no such platform nor is it built to solve problems with existing platforms.

New gophers often struggle with deciding how to structure their applications and also miss certain important conventions (e.g., Accept Interfaces, Return Structs).

Droplets is built to showcase:

  1. A manageable Project Layout
  2. Application of CodeReviewComments and EffectiveGo
  3. Usage of Clean Architecture

Organization

Directory Structure

Directory structure is based on Project Layout.

1. internal/
  • contains non-reusable parts of the project
  • directories inside internal/ are organized as per Clean Architecture
    • domain/ contains different core entity definitions and represents the entities layer.
    • usecases/ contains different busniess logic built around entities and represents the usecases layer.
    • delivery/ exposes the usecases as API or web app and represents interface-adapter layer.
    • stores/ provides storage functions for domain entities and is also part of interface-adapter layer.
2. pkg/
  • contains re-usable parts of the project
  • these packages can be directly imported in other projects without being dependent on logic specific to droplets project.
  • some of the packages included:
    • logger - provides logging functions.
    • graceful - provides a server wrapper with graceful shutdown enabled.
    • middlewares - provides generic middlewares for use in REST or HTTP handlers
3. web/
  • contains web assets such as css, images, templates etc.

License

FOSSA Status

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package internal is the root package for non-reusable components of the application (e.g.
Package internal is the root package for non-reusable components of the application (e.g.
delivery/rest
Package rest exposes the features of droplets as REST API.
Package rest exposes the features of droplets as REST API.
delivery/web
Package web contains MVC style web app.
Package web contains MVC style web app.
domain
Package domain contains domain entities and core validation rules.
Package domain contains domain entities and core validation rules.
stores
Package stores contains different store implementations using MongoDB as storage backend.
Package stores contains different store implementations using MongoDB as storage backend.
usecases/posts
Package posts has usecases around Post domain entity.
Package posts has usecases around Post domain entity.
usecases/users
Package users has usecases around User domain entity.
Package users has usecases around User domain entity.
pkg
Package pkg is the root for re-usable packages.
Package pkg is the root for re-usable packages.
errors
Package errors provides common error definitions and tools for dealing with errors.
Package errors provides common error definitions and tools for dealing with errors.
graceful
Package graceful provides a simple wrapper for http.Handler which handles graceful shutdown based on registered signals.
Package graceful provides a simple wrapper for http.Handler which handles graceful shutdown based on registered signals.
logger
Package logger provides logging functions.
Package logger provides logging functions.
middlewares
Package middlewares contains re-usable middleware functions.
Package middlewares contains re-usable middleware functions.

Jump to

Keyboard shortcuts

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