The connectChannelThingRequest struct in the things/api/http/requests.go file has been updated to include JSON tags for the ThingID and ChannelID fields. This change allows for proper serialization and deserialization of the struct when working with JSON data.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* Fix linting errors
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(linters): add ineffassign linter
This commit adds the `ineffassign` linter to the project's `.golangci.yml` configuration file. The `ineffassign` linter helps identify and flag assignments to variables that are never used, helping to improve code quality and maintainability.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* Add extra linters
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(golangci): Add header check
- Added goheader check to ensure all files have license headers
- Added build tags for "nats" in the .golangci.yml file to include the necessary dependencies for the "nats" package during the build process.
- Also, increased the maximum number of issues per linter and the maximum number of same issues reported by the linter to improve the code quality analysis.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(.golangci.yml): Add new linters
Add the following new linters to the .golangci.yml configuration file:
- asasalint
- asciicheck
- bidichk
- contextcheck
- decorder
- dogsled
- errchkjson
- errname
- execinquery
- exportloopref
- ginkgolinter
- gocheckcompilerdirectives
These linters will help improve code quality and catch potential issues during the code review process.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* 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>
* Add authorization HTTP API to things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add new tests and update existing ones
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update swagger documentation
Update swagger documentation for auth endpoints.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update README docs for things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update docker-compose and fix endpoint typo
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Remove commented code
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>
* 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>
* Split Content-Type header field on semicolon and evaluate all substrings
Signed-off-by: Tony Ward <tony@lucidtron.com>
* included strings library
Signed-off-by: Tony Ward <tony0ward@hotmail.com>
* simplify code, run gofmt
Signed-off-by: tony <tony0ward@hotmail.com>
Signed-off-by: tony <tony@lucidtron.com>
* allow Content-Type to only contain the required type
Signed-off-by: Tony Ward <tony@lucidtron.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>
* 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 SKD tests for creating channel
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add SDK tests for Channel function
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add list channels over SDK tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add SDK tests for updating channel
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add SDK tests for deleting channel
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add users service SDK tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* SDK things tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add SDK test for connecting and disconnecting things from channel
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* testing SDK sending messages
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add tests for SDK func SetContentType
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add all test cases for sending messages
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add handling StatusBadRequest when deleting thing over SDK
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Update error responses when deleting channel and thing
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Removed unused Unauthorized response when creating user
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* update testing CreateChannel, tests if response is some string
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add bad request case in testing CreateToken
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove response error conflict from things service
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix definition of sdk.ErrFailedDisconnect and return error in test cases for disconnecting things
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add handling errors and formatting code
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Defined new ErrFailedPublish error in SDK
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add SDK test for version
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Delete unused http response status in sdk.DeleteChannel
Signed-off-by: Ivan Milošević <iva@blokovi.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>
* Update WS tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use require in all writer tests
Refactor code.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Ignore Mainflux generated pb.go files
Ignore *.pb.go files generated by Mainflux, but don't ignore vendored generated code.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Return an exported ErrNotFound instead of the unexported one
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update mocks to match the actual behaviour
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update mocks error message
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add auth service unavailable error test
Since this error is caused by gRPC server returning codes.Internal,
this behaviour is simulated using specific token. When that token is
passed as an auth header, the mock gRPC client returns aforementioned error.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use require package for postgres tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove redundant error checks in tests
Refactor tests.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename error flag token
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>