* Return Auth service
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update Compose to run with SpiceDB and Auth svc
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update auth gRPC API
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Remove Users' policies
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Move Groups to internal
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Use shared groups in Users
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Remove unused code
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Use pkg Groups in Things
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Remove Things groups
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Make imports consistent
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update Groups networking
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Remove things groups-specific API
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Move Things Clients to the root
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Move Clients to Users root
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Temporarily remove tracing
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Fix imports
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Add buffer config for gRPC
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update auth type for Things
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Use Auth for login
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Add temporary solution for refresh token
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update Tokenizer interface
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Updade tokens issuing
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Fix token issuing
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update JWT validator and refactor Tokenizer
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Rename access timeout
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Rename login to authenticate
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update Identify to use SubjectID
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Add Auth to Groups
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Use the Auth service for Groups
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update auth schema
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Fix Auth for Groups
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Add auth for addons (#14)
Signed-off-by: Arvindh <arvindh91@gmail.com>
Speparate Login and Refresh tokens
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Merge authN and authZ requests for things
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Add connect and disconnect
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update sharing
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Fix policies addition and removal
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Update relation with roels
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Add gRPC to Things
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Assign and Unassign members to group and Listing of Group members (#15)
* add auth for addons
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add assign and unassign to group
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add group incomplete repo implementation
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Move coap mqtt and ws policies to spicedb (#16)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Remove old policies
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
NOISSUE - Things authorize to return thingID (#18)
This commit modifies the authorize endpoint to the grpc endpoint to return thingID. The authorize endpoint allows adapters to get the publisher of the message.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Add Groups to users service (#17)
* add assign and unassign to group
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add group incomplete repo implementation
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users stable 1
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users stable 2
Signed-off-by: Arvindh <arvindh91@gmail.com>
* groups for users & things
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Amend signature
Signed-off-by: Arvindh <arvindh91@gmail.com>
* fix merge error
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Fix es code (#21)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Fix Bugs (#20)
* fix bugs
Signed-off-by: Arvindh <arvindh91@gmail.com>
* fix bugs
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Test e2e (#19)
* fix: connect method
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* fix: e2e
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* fix changes in sdk and e2e
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(docker): remove unnecessary port mapping
Remove the port mapping for MQTT broker in the docker-compose.yml file.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* Enable group listing
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(responses): update ChannelsPage struct
The ChannelsPage struct in the responses.go file has been updated. The "Channels" field has been renamed to "Groups" to provide more accurate naming. This change ensures consistency and clarity in the codebase.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(things): add UpdateClientSecret method
Add the UpdateClientSecret method to the things service. This method allows updating the client secret for a specific client identified by the provided token, id, and key parameters.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Use smaller buffers for gRPC
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Clean up tests (#22)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add Connect Disconnect endpoints (#23)
* fix bugs
Signed-off-by: Arvindh <arvindh91@gmail.com>
* fix bugs
Signed-off-by: Arvindh <arvindh91@gmail.com>
* fix list of things in a channel and Add connect disconnect endpoint
Signed-off-by: Arvindh <arvindh91@gmail.com>
* fix list of things in a channel and Add connect disconnect endpoint
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add: Things share with users (#25)
* fix list of things in a channel and Add connect disconnect endpoint
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add: things share with other users
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Rename gRPC Services (#24)
* Rename things and users auth service
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* docs: add authorization docs for gRPC services
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* Rename things and users grpc services
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* Remove mainflux.env package
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add: Listing of things, channels, groups, users (#26)
* add: listing of channels, users, groups, things
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add: listing of channels, users, groups, things
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add: listing of channels, users, groups, things
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add: listing of channels, users, groups, things
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Clean Up Users (#27)
* feat(groups): rename redis package to events
- Renamed the `redis` package to `events` in the `internal/groups` directory.
- Updated the file paths and names accordingly.
- This change reflects the more accurate purpose of the package and improves code organization.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(auth): Modify identity method
Change request and response of identity method
Add accessToken and refreshToken to Token response
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* clean up users, remove dead code
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(users): add unit tests for user service
This commit adds unit tests for the user service in the `users` package. The tests cover various scenarios and ensure the correct behavior of the service.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add: List of user groups & removed repeating code in groups (#29)
* removed repeating code in list groups
Signed-off-by: Arvindh <arvindh91@gmail.com>
* add: list of user group
Signed-off-by: Arvindh <arvindh91@gmail.com>
* fix: otel handler operator name for endpoints
Signed-off-by: Arvindh <arvindh91@gmail.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Clean Up Things Service (#28)
* Rework things service
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* add tests
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Clean Up Auth Service (#30)
* clean up auth service
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(auth): remove unused import
Remove the unused import of `emptypb` in `auth.pb.go`. This import is not being used in the codebase and can be safely removed.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Update API docs (#31)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Remove TODO comments and cleanup the code
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Update dependenices
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
---------
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: b1ackd0t <28790446+rodneyosodo@users.noreply.github.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
* 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 - 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>
* Init commit - implement errors package on things service
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* things service errors issue
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Decode errors
Add authn service to run script
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Modify tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* service_test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* debug lines
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Regulate tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Improve errors in Redis
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove dead code
Inline if conditions
Rename err var
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Transform errors messages to lowercase
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* improve errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* modify wrap method
inline wrapping errors in redis
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add copyright to errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* wrapping nil error returns wrapper (instead of nil)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* move response messages in test to vars
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* golangcibot review fix
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* golangbot fix review in transport
Signed-off-by: Ivan Milošević <iva@blokovi.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>
* 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>
* 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>
* Update metadata type in things service
Update things service so that metadata has map type. Update repo
implementation by adding sqlx lib.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add sqlx lib to bootstrap service
Add sqlx lib to bootstrap service and update metadata field type.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update metadata in redis streams consumer
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update tests for bootstrap service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix mongo reader logging and driver version
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix mongo reader and writer
Fix mongo reader and writer by updating driver version.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SDK with new metadata format
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update LoRa adapter with new metadata format
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update users service in order to use sqlx
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Replace anonymous struct with map
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update docs for LoRa adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix LoRa application metadata format
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix metadata format in LoRa docs
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add metadata2 var to SDK things test
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>
* 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>
* 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 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>
* Rename Payload field to Metadata
Rename Payload field of Thing to Metadata.
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Revert JSON payload rename in docs
Signed-off-by: Ivan Milošević <iva@blokovi.com>