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>
* Improve path parameters naming
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Improve path parameter naming
improve path parameter naming for:
bootstrap/api/transport.go
twins/api/http/transport.go
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Change functions to suit updated path params
Duplicated the functions decodeView and decodeListByConnection to
form new functions decodeThingView, decodeChannelView,
decodeThingListByConnection and decodeChannelListByConnection. This
was as a result of the two functions being used for both view thing
and view channel services
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Improve path parameter naming
Improve path parameter naming for:
auth/api/http/groups/transport.go
bootstrap/api/transport.go
twins/api/http/transport.go
ws/api/endpoints.go
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* fix swagger files
Updated the following swagger files
api/openapi/auth.yml
api/openapi/cert.yml
api/openapi/websocket.yml
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Move websocket.yml from openapi to asyncapi
deleted websocket.yml file in openapi and created websocket.yml file
in asyncapi
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update websocket.yml file
Update the websocket.yml file to make subtopic optional and
added security (bearerAuth)
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Format new line correctly
format newline for api/asyncapi/websocket.yml
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update websocket.yml file
update the websocket.yml file based on the requested review changes
The document is now valid
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update path parameter naming
make changes to path parameter naming in:
api/openapi/consumers-notifiers.yml
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update path parameters naming
Update path parameters naming to be consistent with Go
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update the mqtt.yml file
update the mqtt.yml file to the latest AsyncAPI version and
make changes on the security of the server
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Add contact information
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update api/asyncapi/mqtt.yml
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Add an empty line between functions
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
---------
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* MF-1348 - Add go-kit transport level logging
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>
* Fix merge
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remark
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go test flags
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in things and http service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix SDK tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in certs and provision service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in consumers service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* General renaming and add ErrMissingToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename httputil -> apiutil and use errors in users servive
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use apiutil errors in auth, bootstrap, readers, things and twins
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Replace errors.Contain by comparison
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify and rename ExtractAuthToken -> ExtractBearerToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix auth key test and remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateUUID check
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* MF-1469 - Indicate proper authentication scheme in Authorization header
Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>
* Fixing the remarks on the last push
Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>
* Remove Bearer prefix in all services and fix tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* MF-1240 - Return to service transport layer only service errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Remove unecessary errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm duplicated errors and fix transport
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert http endpoint_test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix conflict
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* MF-1308 - Use IETF Health Check standard
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add nginx health endpoint
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm github.com/nelkinda dependency
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Check error
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Replace Version by Health in the CLI and SDK
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use new build flag go:build
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert wrong renaming
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* sdk health test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add /health endpoint to openapi doc
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use const for description message
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add version and build time during build
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Time format
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add version and commit using git and build args
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add missing api properties
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix api
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use ./schemas/HealthInfo.yml as
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix example
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use content type application/health+json
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Set Makefile variables only if empty
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* MF-1425 - Rebase mainflux master to resolve conflicts
MF-1425 Enhancement to supply an external UUID for Things and Channels.
Resolve conflicts.
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
* MF-1425 - Test cases changes for SDK
MF-1425 Enhancement to supply an external UUID for Things and Channels.
These are the new testcases added for
- Things Service Testcases
- SDK Things and Channel Testcases
Signed-off-by: Anand Sivaram Palassery <aspnair@gmail.com>
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
* MF-1425 - Fixing Testcases
MF-1425 Enhancement to supply an external UUID for Things and Channels.
Because of the previous commits, the testcases were getting failed
because the way ID was modified. This change is to make sure that
all testcases are revisited to get them fixed.
Signed-off-by: Anand Sivaram Palassery <aspnair@gmail.com>
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
* MF-1425 - Fixing review comments
Fixing the review comments provided.
Signed-off-by: Anand Sivaram Palassery <aspnair@gmail.com>
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
* MF-1425 - Fixing more review comments
Signed-off-by: Anand Sivaram Palassery <aspnair@gmail.com>
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
* MF-1425 - Fixing conflicts
MF-1425 Enhancement to supply an external UUID for Things and Channels.
Fixing the conflicts between aspnair master, and the mainflux master.
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
* MF-1425 Fix the comment and code format per review comments
MF-1425 Enhancement to supply an external UUID for Things and Channels.
1. Remove un-valued comment for a private function
2. Format the code for better readibility
Signed-off-by: Q.S. Wang <wangqs_eclipse@yahoo.com>
* MF-1425 Enhancement to supply an external UUID for Things and Channels.
Fix the format of the API document
Signed-off-by: Q.S. Wang <wangqs_eclipse@yahoo.com>
* MF-1425 Enhancement to supply an external UUID for Things and Channels.
Rename the variable to make it readible.
Signed-off-by: Q.s <wangqs_eclipse@yahoo.com>
Co-authored-by: Anand Sivaram Palassery <aspnair@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.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-1368 - Add internal http api package for query params reading
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use internal/http and internalhttp alias
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv errors types to pkg
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil/query.go and remove aliases
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add blank lines after error definitions
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add ReadBoolValueQuery
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv readBoolValueQuery
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* User ErrNotFoundParam instead of pointer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert ReadUintQuery to use default values
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use default values for all query readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add new enpoint for thing search
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Rename endpoint to /search
Use same request as list endpoint
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Add optional parameters in body (offset, limit)
Add swagger file
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* move all parameters into body
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* fix swagger
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* fix error description
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Add tests
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* remove dead code
fix tests
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* remove unused var
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* fix sdk tests
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* add url endpoint for search test
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* description in swagger
fix tracer string
change test offset
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* rename in tests searchThReq to searchThingReq
Signed-off-by: Ivan Milosevic <iva@blokovi.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>
* NOISSUE - Rename pkg aliases uuidProvider into uuid and fix authn typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add missing error checks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use global uuidProvider
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use expTime globally
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix user uuid provider
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix review
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use idProvider name
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use idProvider instead of uuidProvider
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use idProvider instead of uuidProvider
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>