Categorygithub.com/gotestbootcamp/go-todo-app
module
0.0.0-20241118102409-f0965d73ebed
Repository: https://github.com/gotestbootcamp/go-todo-app.git
Documentation: pkg.go.dev

# README

go-todo-app

A simplistic demo web application in golang to manage TODO list using a JSON-RPC API. This is a demo project/learning aid! Don't use anywhere near production.

Slides of the workshop available at github.com/gotestbootcamp/slides.

Architecture

./go-todo-app

├── api          types used in the public API layer, to decouple from the internal representation
│   └── v1       current version
├── cmd          app entry point. Keep minimal!
├── config       configuration processing, from flags, files...
├── controller   orchestration layer, decodes/encodes object from API, manipulates internal objects
├── ledger       high level data store, deals with objects (e.g. Todo)
├── middleware   utilities to inject in the HTTP handling to augment it
├── model        internal data types definitions, including their operations
└── store        durable data store, bytestream oriented
    └── fake     fake, non durable, data store to be used in testing

Please look at godocs of packages, functions, types for more details

Limitations

Due to the demo nature of the project:

  • The JSON-RPC is minimal, because this project is meant for demo purposes
  • The routes are not very REST-ish nor especially clean
  • bytestream encoding is not versioned
  • No object is thread safe (no locking).

License

MIT

# Packages

No description provided by the author
No description provided by the author
Package config holds all the tunables and knows how to set them and merge the configuration sources.
Package controller implements the Controller part of the Model-View-Controller (MVC) pattern.
Package ledger provides a convenience cache over the Store, providing access by ID to Todo objects.
Package middleware include utilities which can be transparently injected in the http.Handler{,Func} chain to augment it with functionalities, like transparent logging.
Package model implements (a close-enough variant of) the Model part of the Model-View-Controller (MVC) pattern.
Package store implements a minimal persistent key-value store whose keys are auto-increment keys and whose values are data blobs, aka slice of bytes.
No description provided by the author