Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

solher/snakepit-seed

Repository files navigation

snakepit-seed is an example API built using the snakepit toolbox.

Key features

  • Cobra based CLI interface.
  • Auto configuration from files/env/etcd thanks to viper.
  • High expressiveness thanks to the snakepit toolbox.
  • Easy debugging thanks to the logrus logging levels and a "log everything" policy. For each request:
    • Basic logging (method, path, total latency, etc).
    • Context logging (current user, session, etc).
    • Time consuming operations auto-logging (requests/responses unmarshalling/marshalling, database requests and HTTP calls).
    • Stacktraces logging when 500 occurs.
  • High integration testability thanks to loose coupling between the app interfaces (the cobra CLI, the logger and the viper config) and the app requests handler.
  • Powerful and flexible request handling thanks to dynamic handlers. Controllers and business logic is built at runtime and ctx aware. That way, business logic and constants can for example be switched dynamically according to the current user/session/role. This also allows dependency injection without the use of any reflection.
  • Swagger documentation.
  • ArangoDB multi-model (key-value, document and graph support) database.

TODOs

  • Write tests
  • Add a lot of documentation

License

MIT

About

Snakepit based API seed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages