Dušan Borovčanin
c3019fffb6
NOISSUE - Refactor messaging ( #1141 )
...
* Refactor messaging
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename SubscribeHandler to MessageHandler
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove `Auth` event logs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update message pubsub APi
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix topics handling
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update CoAP adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update Twins service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update LoRa adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update OPC UA adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove broker package
Package `broker` is conceptually renamed to package `nats`.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update makefile
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add comment explanation
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix MQTT adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typo
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Move NATS pub/sub implementation to pubsub pkg
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove an empty line in main methods
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Move messaging-related code to messaging package
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Twins mocks
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Change Occurred back to Created
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix tranformer test
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix message proto commands
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Replace string literal with constant
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove alias from main method
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Change messaging pubsub alias
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename occured to created
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Handle NATS connection in the NATS PubSub
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename n to pub/pubSub
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typos
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-28 11:02:35 +02:00
Ivan Milošević
eb9092494e
MF-1128 - Add golangci-linter to a CI script ( #1131 )
...
* Add golangci-linter to CI script
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add no-config flag
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* disable staticcheck
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* disable all except errcheck
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add more linters
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add verbose flag for debug
decrease concurrency to 1
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove errcheck and verbose flag
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* enable just golint
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* fix lint errors
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-21 17:05:19 +02:00
Manuel Imperiale
01aa4190c5
MF-1087 - Remove WebSocket adapter ( #1120 )
...
* MF-1087 - Remove WebSocket adapter
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm all ws directory
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert authorization.js
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Remove /ws endpoint from ssl/authorization.js
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm gorilla from vendor
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert gorilla to vendor
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-17 13:16:21 +02:00
Manuel Imperiale
6c39c85cc8
MF-1096 - Fix AuthN and Things Auth ENVARS ( #1066 )
...
* NOISSUE - Fix AuthN and Things Auth ENVARS
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add DB envars to env.go
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix envars
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add DefLogLLevelError
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix DB names
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix DB names
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix DB names and HTTP ports
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix .env
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert writers DB names
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm unused Twins envars
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 typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Remove definitions from env.go
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert HTTP gRPC ports
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use default NATS URL as string
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert default ports
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix cassandra ENVARS
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix cassandra reader ENVARS
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix readers and writers envars
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix readers and writers .env
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-07 12:02:17 +02:00
Manuel Imperiale
1d78233fe6
MF-1090 - Use named Interfaces args ( #1097 )
...
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-05 13:15:47 +02:00
Manuel Imperiale
fff492bd50
NOISSUE - Create broker package for NATS ( #1080 )
...
* NOISSUEE - Create broker package for NATS
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Create funcs to return NATS connection
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* mv os.exit to main
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix Reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix tests and typos
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix CI
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Unify Publisher and Subscriber interfaces
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename Nats interface
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv message.pb.go, messsage.proto and topics.go to broker directory
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go.mod
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use mainflux broker for writers and twins services
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go.mod
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix twins tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix make proto
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix message.proto
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix golangcibot
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* regenerate message.pb.go
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix make proto
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add NATS errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-01 21:22:13 +02:00
Darko Draskovic
19503742a6
NOISSUE - Update state based on SenML time value ( #1075 )
...
* Update state based on SenML time value
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Use Modf to parse SenML rec time
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Update to State in mocks
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Delta to Twin Definition and iota consts for state actions
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Use action consts for switch statement
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-03-18 19:56:39 +01:00
Darko Draskovic
3e4a9eb16a
Save senml array msg to multiple states ( #1073 )
...
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-03-13 16:20:57 +01:00
Nikola Marčetić
42b3682352
MF-415 - Merge mProxy support ( #1045 )
...
* NOISSUE - Add mProxy support (#1017 )
* Add mproxy
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* Fix docker and add EMQ compose
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* Fix EMQX name
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* Add nats, auth and es
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* Removed unucessary vendoring
Signed-off-by: Drasko Draskovic <drasko.draskovic@gmail.com>
* Update vendoring
Signed-off-by: Drasko Draskovic <drasko.draskovic@gmail.com>
* Fix mproxy interface implementation
Signed-off-by: Drasko Draskovic <drasko.draskovic@gmail.com>
NOISSUE - Aligned Event interface method signatures with new spec (#1025 )
* Aligned Event interface method signatures with new spec
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
* Updated deps
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
NOISSUE - Update mproxy dependency (#1038 )
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
Update Vendor with new mProxy (#1043 )
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Twins merge conflict reverted
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
Twins merge conflict reverted
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
Twins fixed nats import
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
Update deps
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
* Resolved GolangCI remarks
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
Resolved GolangCI remarks
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
Resolved GolangCI remarks
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
* Fixed Event interface Unsubscribe() typo
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
* Update vendors
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Upgrade CI script
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-02-26 17:14:16 +01:00
Darko Draskovic
3b5d51276f
NOISSUE - Remove twins-service mqtt dependency and publish notifs to nats ( #1042 )
...
* Add Publish func to nats
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove mqtt client
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add nats publisher
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Separate nats publisher from subscriber
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Update tests creation methods
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add logger to NATS Publisher
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-02-20 00:10:10 +01:00
Darko Draskovic
a30a3b9063
Add arbitrary SenML value type saving to twin state ( #1039 )
...
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-02-18 19:56:39 +01:00
Darko Draskovic
51cd0524a1
MF-998 - Add Twins service to Makefile and docker-compose.yml ( #1035 )
...
* Add separate twins mongodb
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Move twins docker compose file to addons
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add depends_on to mainflux-twins container
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove hard-coded vals from .env
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add start explanation to README.md
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Bump mongo image to latest version
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-02-12 18:34:48 +01:00
Darko Draskovic
f785116a6f
NOISSUE - Add aggregate attribute-based search for twin retrieval ( #1027 )
...
* Add attribute map for twin retrieval
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Restructure attributes from map[string] to []
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove RAM attribute map and use mongo aggregation
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Update tests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove attribute map service property
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-02-04 23:25:51 +01:00
Darko Draskovic
575d1d6bbf
NOISSUE Fix obsolete attribute persistance ( #1018 )
...
* Fix obsolete attribute update
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Inlined map key presence check
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-01-27 02:15:10 +01:00
Darko Draskovic
0d361f3df1
Fix twins update revision counter ( #1011 )
...
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-01-22 15:58:24 +01:00
Darko Draskovic
b3991b8497
MF-730 - Add digital twin service for things ( #855 )
...
* Add starter kit
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add http
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add cmd/main.go
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove reference to things from README.md
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add starter kit
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add http
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add cmd/main.go
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove reference to things from README.md
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix env vars in README.md
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix env vars in README.md
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Rename kit to mfxkit
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Rename kit to mfxkit
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add docker compose related files
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add docker compose related files
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Dockerfile to mfxkit
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Dockerfile to mfxkit
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add twin service to docker-compose.yml
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add twin service to docker-compose.yml
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mongo db connection
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mongo db connection
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add TwinRepository mockup
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix docker env vars
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix docker env vars
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add twins repo mongodb routines
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add twins repo mongodb routines
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mongo db docker test suite
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mongo db docker test suite
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add idp and toDBTwin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add idp and toDBTwin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add test cases to repo twin save test
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add test cases to repo twin save test
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add users grpc
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add users grpc
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add methods and tests for udpate and update key
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add methods and tests for udpate and update key
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add methods and tests for remove twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add methods and tests for remove twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add svc methods to loggin and metrics
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add svc methods to loggin and metrics
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add AddTwin endpoint
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add AddTwin endpoint
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add update endpoints
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add update endpoints
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add view and remove endpoints
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add view and remove endpoints
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add twin repo mock
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add twin repo mock
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add owner arg to twins repo methods
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add owner arg to twins repo methods
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mock idp service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mock users service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add tests for service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add tests for service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt client to twins service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt client to twins service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add protocol to mqtt string var
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add protocol to mqtt string var
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add time and attributes related data to Twin struct
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add time and attributes related data to Twin struct
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt publish JSON serialized twin to service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt publish JSON serialized twin to service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add endpoint tests for save and update twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add endpoint tests for save and update twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add endpoint tests for update key and view thing
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add endpoint tests for update key and view thing
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix test error for view twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix test error for view twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add endpoint tests for remove twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add endpoint tests for remove twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add NATS client
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add NATS client
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add normalizer to nats
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add normalizer to nats
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Refactor nats publish() and remove normalizer
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Refactor nats publish() and remove normalizer
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add ListThingsByChannel() and RetrieveByChannel()
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add ListThingsByChannel() and RetrieveByChannel()
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Twin struct directly in mongodb
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Twin struct directly in mongodb
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Change limit type to uint64
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Change limit type to uint64
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Compose nats subject from msg ch and subtopic
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Compose nats subject from msg ch and subtopic
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt notifs for thing creation and key update
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt notifs for thing creation and key update
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add RetrieveAll to twinRepository and ListTwins to service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add RetrieveAll to twinRepository and ListTwins to service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add tests for RetrieveAll and ListTwins
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add tests for RetrieveAll and ListTwins
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix Service interface error
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove test Ping endpoint
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt topic to service config
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove UpdateKey request and add fields to Twin related requests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Attributes and State add and view
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add ListTwins endpoint
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix service and database tests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add ListTwinsByThing endpoint
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove twin directory
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add States and Definitions to Twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add defer publish to AddTwin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add refactored and deferred mqtt client publish to Service methods
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add paho subservice
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add paho client to nats
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add mqtt publish and state update
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add Publish wrapper
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Use paho Publish wrapper
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix tests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Save states in separate collection
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Replace []byte payload by []map[string]interface{}
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add offset to PageMetadata
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Rename TwinsPage to Page
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add StateRepository
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add StateRepository, mongodb StateRepository adapter and ListStates endpoint
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add RetrieveLast twin to states repository
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Parse def in nats to update state attrib
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add prepareState() helper
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Replace list things by id by view thing by id
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add state repo mock
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix service tests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix mongo twins repo tests and remove owner from RetrieveByID params
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix mongo twins repo tests and remove owner from Remove params
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Replace ChannelID in Attribute by Channel
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix endpoint tests for add and update twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix endpoint tests for view and remove twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Use new auth service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix mocks auth and mongodb tests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix licensing info
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix 'for for'
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Replace short dec by var for default vals and add string map for mqtt op info
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Use Record from mainflux/senml and rename broker to nats in main.go
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove Key from Twin
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove redundant id uniqueness check from mongodb
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add attrib name to attrib update info
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix typos and remove isZeroOfUnderlyingType() helper
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Rename paho to mqtt
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix env vars in main.go and README.md
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Move twins/api/twins to twins/api and rename twins- prefix to tw- in main.go
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove flows for manual testing and revert to master docker-compose.yml
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove publish from nats and fix tests by updating package names
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Rename users.go to authn.go
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix crud op names
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Change id to twinID
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Inline if err != nil and change <prefix>ID to <prefix>_id
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix metadata db search test
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Rename mqtt and nats related files to publisher and subscriber respectively
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Move save state logic from nats to service
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Fix endpoint tests
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove close check from main.go
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Complete deploy section
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add unit tests for states
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Remove debugging artefacts and unneeded comments to exported funcs
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
* Add port num to defAuthnURL
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-01-10 17:25:36 +01:00