* Fix connection request validation and EOF error handling
Fix validation of connection and client id in connection request.
Fix EOF error handling by returning HTTP status Bad Request.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add manager API tests and update swagger
Implement unit tests for every manager API endpoint. Update client
and connection mock implementations by switching to UUIDs. Update
swagger file with correct status codes.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add content type check and update documentation
Add content type check in implementation and update documentation
accordingly. Refactor tests and add empty content type test cases.
Add code coverage badge to readme.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add logger interface and go-kit logger implementation
Add wrapper logger interface and wrap go-kit logger in it. Add
tests for info, warn, error and log methods. Add log filtering by
level.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Refactor logger and replace go-kit logger with wrapper
Replace go-kit logger from services with logger wrapper. Refactor
code in logger wrapper. Remove unnecessary subpackage, methods and
log levels.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
All validation has been moved to the API resources layer, i.e. the
domain objects provide validation method, but the service itself assumes
no corrupted values are passed to it.
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
Services are versioned through top-level package. The package itself
contains an HTTP header that will be bound to the '/version' endpoint of
each of the available services.
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
Setup top-level glide dependencies file. Migrated all of the manager
service code into this repository. Fixed docker build procedure.
Extracted executable to the top-level.
Signed-off-by: Dejan Mijic <dejan@mainflux.com>