Ian Ngethe Muchiri
5fa2bf4229
1890 - Update error encoding ( #1891 )
...
* update error encoding
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* fix semaphore fail
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update encode error
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update bootstraptests
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update notifiers endpoint_test
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update tokens_test
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update json.unmarshal into expected struct
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update .env
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update sdk_error to check if err is empty
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update message_test
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update error marshaling
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update tests
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Redo makefile
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Add fullstop to comments
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* Update rebase error
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
---------
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2023-08-24 15:09:23 +02:00
Washington Kigani Kamadi
822a607e31
NOISSUE - Change error description ( #1892 )
...
* Change error description
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix typo
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Create specific error for login
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Add period to comment
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* fix error description
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
---------
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
2023-08-23 14:48:03 +02:00
Washington Kigani Kamadi
e2992cbede
NOISSUE - Change import name aliases ( #1868 )
...
* Change import name aliases
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Change import name aliases
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Change import aliases
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Remove unused aliases
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Fix aliases
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
FIx errors
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Fix error
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
FIx merge
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
FIx merge
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
FIx merge
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix import alias
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix errors
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix linter
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix linter
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix import
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Add linter to CI pipeline
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Changes
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Remove unused aliases
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix merge issues
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix gci
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix gci
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix gci
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Add gofumpt
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Remove multiple gofupmt in CI
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Remove unnecessary changes
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix linter
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
* Fix CI pipeline
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
---------
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
2023-08-11 11:30:25 +02:00
Aryan Godara
5e8555444a
MF-1723 - Fix lack of logging for invalid query params ( #1724 )
...
* fix error package errors
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix bootstap and bootstrap api
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix certs
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix consumers
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix http
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix provision
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix readers
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix twins
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix things
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix users
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix sdk excpet channel policies users things
Signed-off-by: aryan <aryangodara03@gmail.com>
* tests passing, but logging not working for things and users
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix sdk tests, and other failing tests
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix comment
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix errors acc to pr review
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix errror wrapping in consumers api
Signed-off-by: aryan <aryangodara03@gmail.com>
* all tests running
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix encodeError
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix minor issues
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix failing sdk policy tests
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix errors in things test sdk
Signed-off-by: aryan <aryangodara03@gmail.com>
* update things service
Signed-off-by: aryan <aryangodara03@gmail.com>
* update usrs service
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix things and users sdk
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix sdk for channels groups policies things users
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix remaining services and sdk
Signed-off-by: aryan <aryangodara03@gmail.com>
* fix bootstrap twins
Signed-off-by: aryan <aryangodara03@gmail.com>
* resolve conflicts
Signed-off-by: aryan <aryangodara03@gmail.com>
* Shift errmalformedentity to pkg/errors
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix bootstrap service
Signed-off-by: aryan <aryangodara03@gmail.com>
* Add errors.Unwrap and use in encodeError
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix type in print statement for policies_test
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix ordering of errvalidation wrapping and encodeError
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix failing tests
Signed-off-by: aryan <aryangodara03@gmail.com>
---------
Signed-off-by: aryan <aryangodara03@gmail.com>
2023-08-09 23:02:44 +02:00
Arvindh
e925ca7e65
CLI bug fixes ( #1866 )
...
fix: comment formt
fix: CI error
change to mf errors
change to lowercase in error first word
fix: send message test case
remove: unused const
Signed-off-by: Arvindh <arvindh91@gmail.com>
2023-07-28 15:05:43 +02:00
Ian Ngethe Muchiri
031e0a62f2
NOISSUE-Update invalid secret error handling ( #1856 )
...
* update invalid secret error handling
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update secret error naming
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* update secretError naming
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* fix comment
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
* add empty space in comment
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
---------
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2023-07-12 23:02:59 +02:00
Dušan Borovčanin
55e09c1921
MF-1506 - Group-based Access Control ( #1716 )
...
* Move Things and Users to Clients
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Update Add and Delete Policies (#1792 )
* Remove Policy Action Ranks
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Rebase Issues
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix CI Test Errors
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Adding Check on Subject For Clients
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Remove Check Client Exists
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Check When Sharing Clients
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Only Add User to Group When Sharing Things
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Remove clientType
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Minor Fix on ShareClient and Fix Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Policies Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Clean Up Things Authorization
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Tests on RetrieveAll
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Test ShareThing
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Merge Conflicts
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Remove Adding Policies. Only Use Ownership
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Check If Subject is same as Object
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Move Back To Union As Sometimes Policy is Empty and Fails to Evaluate on Ownership
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Entity Type For Failing Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix BUG in policy evaluation
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Comments Regarding checkAdmin
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Tests On Rebase
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Combine Authorize For Things and Users
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Tests On Rebase
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Error on Things SVC `unsupported protocol scheme`
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
---------
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix Bug on Things Authorization Cache (#1810 )
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Use Password instead of username in MQTT handler
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Simplify MQTT authorization
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix MQTT tests
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Add More Functions to SDK (#1811 )
* Add More Functions to SDK
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Examples to GoDoc
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Update Unassign Interface
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Pass Subject as ID and Not Token on List Channels By Thing
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Bootstrap Errors For Element Check
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add empty line Before Return
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Reorder URLS in things mux
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Listing Things Policies
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Share Thing
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Examples to CLI Docs
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Update Identity To Update Another User
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Identify an Update Policies on Things
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Update Things Policies
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix GoDocs on Disconnect
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Change Authorize To Use AccessRequest
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
---------
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* For Evaluate Policy Use AccessRequest (#1814 )
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Add SDK Tests (#1812 )
* Add Things Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Channel Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Certs Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Consumer Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Enrich Group Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Tests For Health
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Tests For Tokens
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Rename SDK for Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Policies Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Linter
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Fix Tests
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Make Variable Defination Inline
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
---------
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Make Cache Key Duration Configurable (#1815 )
* Make Cache Key Duration Configurable
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Rename ENV Var
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
---------
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Update GoDocs (#1816 )
* Add GoDocs
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add Missing GoDoc Files
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Enable godot
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
* Add License Information
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
---------
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* NOISSUE - Add Call Home Client to Mainflux services (#1751 )
* Move Things and Users to Clients
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
* collect and send data package
Signed-off-by: SammyOina <sammyoina@gmail.com>
* create telemetry migrations
Signed-off-by: SammyOina <sammyoina@gmail.com>
* add telemetry endpoints
Signed-off-by: SammyOina <sammyoina@gmail.com>
* add transport
Signed-off-by: SammyOina <sammyoina@gmail.com>
* create service
Signed-off-by: SammyOina <sammyoina@gmail.com>
* remove homing server
Signed-off-by: SammyOina <sammyoina@gmail.com>
* add call home to adapters
Signed-off-by: SammyOina <sammyoina@gmail.com>
* add last seen
Signed-off-by: SammyOina <sammyoina@gmail.com>
* rename logger
Signed-off-by: SammyOina <sammyoina@gmail.com>
* remove homing client
Signed-off-by: SammyOina <sammyoina@gmail.com>
* use unmerged repo
Signed-off-by: SammyOina <sammyoina@gmail.com>
* use renamed module
Signed-off-by: SammyOina <sammyoina@gmail.com>
* update call home version
Signed-off-by: SammyOina <sammyoina@gmail.com>
* edit documentation
Signed-off-by: SammyOina <sammyoina@gmail.com>
* align table
Signed-off-by: SammyOina <sammyoina@gmail.com>
* use alias for call home client
Signed-off-by: SammyOina <sammyoina@gmail.com>
* update callhome
Signed-off-by: SammyOina <sammyoina@gmail.com>
* update call home pkg
Signed-off-by: SammyOina <sammyoina@gmail.com>
* update call home
Signed-off-by: SammyOina <sammyoina@gmail.com>
* fix modules
Signed-off-by: SammyOina <sammyoina@gmail.com>
* use mf build version
Signed-off-by: SammyOina <sammyoina@gmail.com>
* use mf build version
Signed-off-by: SammyOina <sammyoina@gmail.com>
* restore default
Signed-off-by: SammyOina <sammyoina@gmail.com>
* add call home for users and things
Signed-off-by: SammyOina <sammyoina@gmail.com>
* enable opting on call home
Signed-off-by: SammyOina <sammyoina@gmail.com>
* remove full stops
Signed-off-by: SammyOina <sammyoina@gmail.com>
* update callhome client
Signed-off-by: SammyOina <sammyoina@gmail.com>
* add call home to all services
Signed-off-by: SammyOina <sammyoina@gmail.com>
* fix build
Signed-off-by: SammyOina <sammyoina@gmail.com>
* restore sdk tests
Signed-off-by: SammyOina <sammyoina@gmail.com>
* remove unnecessary changes
Signed-off-by: SammyOina <sammyoina@gmail.com>
* restore health_test.go
Signed-off-by: SammyOina <sammyoina@gmail.com>
---------
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
---------
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
2023-06-14 12:40:37 +02:00
Dušan Borovčanin
c0c72491ff
NOISSUE - Logger Fatal method returns no value ( #1728 )
...
* Make Fatal return no value
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add Fatal test
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Rename logger imports
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Replace Fatal with Fatalf
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Refactor Logger tests
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix expected and actual order inversion
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Update dependencies
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
---------
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2023-02-22 20:50:51 +01:00
Aryan Godara
e6e9d22133
MF-1670 - Improve error handling in SDK ( #1674 )
...
* initial commit
Signed-off-by: aryan <aryangodara03@gmail.com>
* remove unused variables.
Signed-off-by: aryan <aryangodara03@gmail.com>
* removed temporarily created file.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix failing CI
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix thing_test failing cases.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove dead code, debug statements, and add comments.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Extract errors to separate file.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Updated things/api/http tests
Signed-off-by: aryan <aryangodara03@gmail.com>
* Created custom SDK error.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Changed to using CheckError. All tests passing.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Replace error interface with errors.SDKError interface.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Fix failing CI.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove unused sdk errors.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Change SDKError to error in internal function of sdk package.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove unused error.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove encodeError. All tests working.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Rename sdkerr vars, convert common strings to constants.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Change checkerror to take error instead of string.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove unused errors, and removed errfailedwhitelist wrap.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Removed unused errors, and remove errors.go since it only had a repeated error from errors package
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove unused errors.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Update sdk_error.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Used function to reduce code for sending and receiving requests.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Added function sendrequestandgetheadersorerror.
Signed-off-by: aryan <aryangodara03@gmail.com>
* sdk_error updated.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Updated function names to processRequest.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Made errors internal, fixed typo in http.
Signed-off-by: aryan <aryangodara03@gmail.com>
* Remove empty line.
Signed-off-by: aryan <aryangodara03@gmail.com>
* merged proceessBody and processHeaders functions in sdk.
Signed-off-by: aryan <aryangodara03@gmail.com>
* remove sendThingRequest function.
Signed-off-by: aryan <aryangodara03@gmail.com>
* changed processRequest signature
Signed-off-by: aryan <aryangodara03@gmail.com>
* changed processRequest signature, changed error names.
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2022-12-15 16:24:19 +01:00
Dušan Borovčanin
6c59184d3f
NOISSUE - Fix CI script ( #1613 )
...
* Fix CI script
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix linter errors
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add timeout to linter
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-06-09 21:57:37 +02:00
Arvindh
b19ba0db7d
MF-1525 - Add graceful stop for HTTP and GRPC servers ( #1548 )
...
* Add : errgroup to cmd/auth
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add : Handle graceful stop for auth service
Remove : errgroups from auth service
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add : Wait till server shutdown
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Change : instead of waitgroup changed to errgroups
Signed-off-by: Arvindh <arvindh91@gmail.com>
* change : KillSignalHandler return type to error
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Empty Commit
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add : Context to http server shutdown
Rename : varaible from proto to protocol
Signed-off-by: Arvindh <arvindh91@gmail.com>
* change : to default log level
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add : Sign-off
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add: graceful stop of http and grpc server
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Fix: typos and caps
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add: Signed-off
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Rename: Func KillSignalHandler to SignalHandler
Add: SIGABRT
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Fix: auth service
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add: timeout for grpc gracefulstop
Fix: typos
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add: .vscode folder to git ignore
Signed-off-by: Arvindh <arvindh91@gmail.com>
* change: variable name to stopWaitTime
Signed-off-by: Arvindh <arvindh91@gmail.com>
* remove: .vscode folder
Signed-off-by: Arvindh <arvindh91@gmail.com>
* remove: .vscode from .gitignore
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add : logger to handlers
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Add : New line at end of .gitignore file
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Fix : variable naming
Add : graceful stop for timescale
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Remove : unsued NATS library from import
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Move: "https" and "https" to moved to const var
Signed-off-by: Arvindh <arvindh91@gmail.com>
* Move: "http" and "https" to moved to const var
Signed-off-by: Arvindh <arvindh91@gmail.com>
* update: branch with master
Signed-off-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2022-05-03 13:57:54 +02:00
Manuel Imperiale
9972d1d1a4
MF-1240 - Return to service transport layer only service errors ( #1559 )
...
* 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>
2022-02-14 22:49:23 +01:00
Manuel Imperiale
9e0947a355
MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz ( #1538 )
...
* MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* ErrExternalKey typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename ErrUnauthorizedAcces -> ErrAuthentication
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix bootstrap error
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix status code in openapi
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix test description
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix test description
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix test description
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add errors cases
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix status codes
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add gRPC stutus code
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix tests description
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix openapi and encodeError
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix grpc message
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix test descriptions
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert sdk error
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-02-01 17:33:23 +01:00
Manuel Imperiale
6ad654d7cb
MF-1263 - Move repeating errors to the separate package ( #1540 )
...
* MF-1263 - Mv duplicated errors to pkg/errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert test build flags
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix merge
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2022-01-27 17:03:57 +01:00
Manuel Imperiale
9245e2593b
MF-1368 - Add internal http api package for query params reading ( #1384 )
...
* 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>
2021-03-23 11:48:05 +01:00
Darko Draskovic
8b2ae46324
Add READMEs to pkg packages ( #1352 )
...
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2021-02-04 20:04:41 +01:00
Alexander Obukhov
ecff066421
NOISSUE - Fix some typos ( #1212 )
...
Signed-off-by: Alexander Obukhov <dev@sprql.space>
2020-06-29 20:48:14 +02:00
Darko Draskovic
4a9c7403d8
MF-1198 - Add errors package tests ( #1207 )
...
* Add tests for errors package
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add recursive fn to gen wrapped errs and func to gen corresponding msg
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add TestWrap func
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Replace literal string msgs with res of messages()
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add nil tests for errors.Contains()
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add nil tests for Wrap()
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-06-12 12:13:23 +02:00
Dušan Borovčanin
ea3a891c91
MF-1190 - Add pkg for library packages ( #1191 )
...
* Move messaging to pkg
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Move errors to pkg
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Move Transformers to pkg
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Move SDK to pkg
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Remove Transformers from root
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix make proto
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Add copyrights header
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix CI
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Move Auth client to pkg
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix dependencies
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Update dependencies and vendors
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
* Fix CI
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-06-03 15:16:19 +02:00