* MF-1389 - Add /disconnect endpoint in Things service
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
* Add db transaction in Postgres' Disconnect
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
* Reformat things mock and things http api
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
* Update naming of /disconnect endpoint decoder
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
* Update naming for /connect endpoint
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Update naming based on new endpoint
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
* Update disconnect endpoint test case descriptions
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
* MF-1362 - Sort Things and Channels connections by name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Remove test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add order and direction tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* MF-1290 - Sort Things and Channels by name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add sort HTTP parameter and use PageMetadata to pass filters
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix channels conn list
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix logs
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Replace sort naming by order
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add order in responses
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve order tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve getNameQuery func
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix commits
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add name-asc and name-desc
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add dir query parameter
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix openapi
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix openapi format
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix test messages and openapi.yml
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix openapi uuid format
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Check query parameters in endpoint layer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add asc endpoint tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename pageMeta into pageMetadata
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* MF-983 - Add HTTP query param to connections list endpoints to fetch non connected Things or Channels
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typos and add Swagger
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Update SDK and CLI
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify queries
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix tabulation
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* NOISSUE - Fix bootstrap token naming and interfaces named args
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix CI bot
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use owner for repository layer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* NOISSUE - Update coding style in Things service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix things.Page
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add inital Auth implementation
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Extract IssuedAt on transport layer
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add token type
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Auth service URL in Things service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add User Keys revocation check
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove unused tracing methods
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Key retrival and parsing
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove unused code
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Increase test coverage
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix compose files
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typos
Simplify tests.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typos and remove useless comments
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename Auth to Authn
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename database.go to tracin.go
A new name (`tracing.go`) describes better the purpose of the file.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Increase test coverage
Fix typo.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Increase test coverage
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove token from Users service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix identify login keys
Rename token parsing method.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Extract tokenizer to interface
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove pointer time
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use pointer for expiration time in response
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use uppercase N
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove unnecessary email check
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Cleanup unused code and env vars
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename tokenizer field
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use slices and named fields in test cases
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update AuthN keys naming
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove package-lock.json changes
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove Secret from issuing request
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Change connect endpoint to use bulk connections
Signed-off-by: nwneisen <nwneisen@gmail.com>
* Add documentation for bulk connect
Signed-off-by: nwneisen <nwneisen@gmail.com>
* Update service and postgres for multiple channels
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Update bulk connect endpoint
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Fix missed test
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Improve test code coverage
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change methods to use shared data type
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Fix provisioning example
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change depreciation messages to specify v1.0.0
Signed-off-by: nwneisen <nwneisen@gmail.com>
* Switch singluar log to plural
Signed-off-by: nwneisen <nwneisen@gmail.com>
* Change thing's service to use bulk connect
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Move owner check outside of loop
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change invalid user to unauthorized access error
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change single endpoints to use bulk creation
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Remove single creation from thing's service
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Remove single save from thing's postgres
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change BulkSave to Save
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change service calls to use variadic parameters
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change postgres things to use variadic functions
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Add depreciation warnings
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Add provisioning to postgres
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Add provisioning to things and channels service
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Add JSON provisioning endpoint to things API
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Add provisioning to SDK and CLI
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Update docs
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Remove response location and adjust channelsFromFile
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change naming from 'provison' to 'bulkCreate'
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Add gocsv to vendors folder
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Update "bulk" naming
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Move CSV to CLI and remove gocsv dependancy
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Update docs and responses
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change AddThings to be CreateThings
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Improve test coverage
Signed-off-by: nwneisen <nwneisen@gmail.com>
* Fixes after review
Signed-off-by: nwneisen <nwneisen@gmail.com>
* Change CanAccess to CanAccessByKey for things
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change CanAccess in remaining occurances
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Regenerate generated files
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Generate pb.go files with protoc 3.6.1
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Use ThingID to update certs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix logging typo
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update API tests and service mock
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix API docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Provide secured bootstrapping
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix test and mock methods signatures
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typos
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add encrypte bootstrap test
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove duplicated docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use secret key to encrypt bootstrap request
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use secret key for secure bootstrapping
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Move encryption to ConfigReader
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove ConfigReader from Service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add reader tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update API docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Unset key env variable
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add endpoint test for secure bootstrap
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add open tracing dependencies
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to users service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the http adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the ws adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the CoAP adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update LoRa adapter in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update SDK tests in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update bootstrap service in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update reader services with accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update .env and docker-compose file
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add jaeger and timeout env vars
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Fix broken test for can access by id endpoint
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update deps with proto empty package
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add can access by things ID endpoint to things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add new auth endpoint to the swagger docs
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add test for the new endpoint of the things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* NOISSUE - Add searchable Things name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add postgres schema validation and tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add namme tests in requests_test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* NOISSUE - Add searchable Channels name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix test description
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix bootstrap mocks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* NOISSUE - Add searchable Things name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add postgres schema validation and tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add namme tests in requests_test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Typo fix
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm requests_test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add name in ListThings loggins
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add invalidName var for tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Set maxNameSize to 1024
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix postgres test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix total when filtering things by name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix review
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add support for setting up thing key manually
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix existing tests and add new ones
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SQL schema for things entity
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add update thing key endpoint to swagger docs
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix response code when handling conflicting key
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add check if Channels already exist
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update streams tests to use time offset
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add initial Bootstrap event producer
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add operation name to events
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add ES path for BS events
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add BS event sourcing tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add connections update events
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Extract event XADD to separeate method
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add header comments
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix service docs typo
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update BS service README.md
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update Service method tests
Tests for handler methods are not added.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>