* Change bootstrap service port to 8200
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix redis streams tests in things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add list channels by thing id endpoint
Add list channels by thing id endpoint to things service. Add
pagination format and logic.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add fetch channels by thing endpoint
Add fetch channels by thing endpoint with pagination.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update list endpoints to contain pagination
Update list endpoints to contain pagination metadata.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add tests for two new endpoints
Add tests for two new endpoints and update existing ones. Also,
remove connected field from channel response.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix tests for SDK
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add SDK methods for new endpoints
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update swagger docs for things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add error handling to http tests
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix response body in http tests
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Remove unused responses from things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add test cases to things postgres tests
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add test cases for event sourcing
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix event sourcing client on LoRa adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix tests for things redis streams
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in things service
Update increment ID to UUID for things and channels in things
service and proto files. Also, update ID type from uint to string.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in http adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in ws adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in CoAP adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in normalizer service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in writer services
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in reader services
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in SDK
Update increment ID to UUID in SDK. Update id type to string.
Update tests.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update increment ID to UUID in mqtt adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Remove unnecessary case from influxdb reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update tests in order to increase code coverage
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update lora adapter to use string ID instead of unsigned int
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add metadata field to channels and update things metadata
Add metadata field to channels. Update thing metadata field to be
in JSON format. Update tests..
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add metadata to channel events
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add metadata field to channel in go SDK
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add event sourcing middleware for things service
Add event sourcing for write operations over things and channels.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add tests for event sourcing middleware
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update things in tests to contain metadata field
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Refactor Mainflux go SDK
Add structures instead of string parameters. Add offset and limit
parameters to things and channels methods. Add better configuration
support.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add new public errors with better error handling
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SDK to use uint instread of string id
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update cli to use new SDK API
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Remove TLS termination from nginx configuration
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SDK documentation and structures
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Refactor things service
Decouple HTTP layer from business logic. Remove ID number validation
check. Remove models from HTTP requests and responses.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Reformat tests for things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Increase test coverage for things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* MF-384 - Add test for Redis cache
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add copyright headers
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix copyright header
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix test setup
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* handling errors and put test cases in maps instead of slices
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add test case if thing already exists
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix TestThingSave to use require instead of assert
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add test case for removing non-existing thing from cache
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Use table of test cases for Remove and test Connect for every case
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Use table of test cases for Save
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Test cases in slice instead of map for testing Remove
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Make test-cases independent, use asserts instead of requires
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Use slice and map where appropriate
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add redis caching for thing and channel connections
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix authorization caching flow
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update things documentation
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>