Manages integers as BST. Provides a REST API for basic tree actions
Install Golang 1.12 or higher.
Run go get github.com/TriAnMan/alltoolstest/...
and go build github.com/TriAnMan/alltoolstest/cmd/bst-server
Download https://github.com/TriAnMan/alltoolstest/blob/master/init.sample.json
into your working directory.
Run ./bst-server -init-file="./init.sample.json"
- Use Red-Black Tree as of BST to achieve O(log n) time for a search operation (no need to rebalance a tree).
- App exploits a fail-fast methodology.
- Simple DDD pattern is used to prevent circular dependencies (https://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/).
- Non over-engineered architecture is implemented to reduce development time.
- /insert and /delete REST methods are idempotent.
- REST replies absent body but have consistent HTTP codes.
- Use some REST API framework with a SWAGGER docs generator.
- Improve godoc.
- Cover REST API methods with functional tests.