Commit Graph

929 Commits

Author SHA1 Message Date
Dušan Borovčanin be1361311d
NOISUE - Fix cache error when key is not in Redis (#1220)
* Fix cache error when key is not in Redis

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix tests

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix errors message

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-07-14 22:54:33 +02:00
Darko Draskovic c1088b9315
MF-1199 - Add NATS messaging tests (#1209)
* Add test setup for mqtt

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add pubsub tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add message and payload helper funcs

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add time.Sleep after subscribe to topic

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add NATS tests setup

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add NATS test cases

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add message forwarded check to handler

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove race affected mqtt tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-07-14 18:11:27 +02:00
Mirko Teodorovic 2453cd75ed
NOISSUE: Fix emailer (#1219)
* update swagger

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* dont return nil

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* simplify emailer New

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-07-14 03:06:13 +02:00
Dušan Borovčanin 7dc6b0d879
NOISSUE - Update dependencies (#1218)
* Update Go version

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependencies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-07-13 15:24:55 +02:00
Darko Draskovic 381ebb1e51
NOISSUE - Add subtopic wildcard for twin attribute's definition (#1214)
* Add wildcard to attribute subtopic

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add MF_TWINS_SUBTOPIC_WILDCARD env var

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove configurable wildcard env var and mqtt notif leftovers

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mongodb RetrieveByAttribute tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add redis wildcard subtopic IDs retrieval

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add tests for wildcard state save

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-07-09 12:18:19 +02:00
Mirko Teodorovic 09d09c6ef5
fix envs for nginx (#1215)
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-07-08 10:42:33 +02:00
Darko Draskovic a7eee53dfb
Remove twin mqtt related obsolete var and fix es-redis address (#1213)
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-07-02 18:03:59 +02:00
Alexander Obukhov e6b7fd818b
NOISSUE - Remove unused `MF_THINGS_SECRET` env var (#1211)
Signed-off-by: Alexander Obukhov <dev@sprql.space>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-06-29 22:28:20 +02: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
Dušan Borovčanin 8d33285489
NOISSUE - Remove unknown Bootstrap requests (#1210)
* Remove unknown Bootstrap requests

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update docs

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix migrations

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-06-26 13:24:56 +02:00
Alexander Obukhov ee5c76395a
NOISSUE — Use `pgcrypto` instead `uuid-ossp` for UUIDs generation (version 4) (#1208)
According to
https://www.postgresql.org/docs/current/uuid-ossp.html
it's recommended to use
https://www.postgresql.org/docs/current/pgcrypto.html
for randomly-generated (version 4) UUIDs

Signed-off-by: Alexander Obukhov <dev@sprql.space>
2020-06-19 00:37:54 +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
Mirko Teodorovic 381a15a695
MF-1025 - timeout env in sec, use parseduration (#1206)
* timeout env in sec, use parsduration

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* timeout env in sec, use parsduration

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* rename var

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-06-08 18:17:16 +02:00
Manuel Imperiale a7b81dc37a
MF-1201 - Fix MF_THINGS_AUTH_GRPC_URL mongo reader ENVAR (#1203)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-06-05 17:39:22 +02:00
Dušan Borovčanin a1643b1e7e
NOISSUE - Fix CI (#1204)
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-06-05 17:29:24 +02:00
Darko Draskovic 340e685d70
MF-1180 - Add redis based twins and states cache (#1184)
* Add twins redis cache

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add connectToRedis to twins main and twinCache to twins service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add tracing to twins cache

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twins cache mock and test setup for redis cache

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add TestTwinSave to redis twins cache tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add remove twin redis cache test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add channels param to CreateDefinition helper method in mocks

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add IDs test to redis twins cache

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Simplify senml rec array and attribute creation funcs by removing unnecessary params

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Align cache remove twin method with service remove twin method

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add cache funcs to twins save, update and remove

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add def SaveIDs to redis cache and ref to service SaveStates

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add TwinSaveIDs tests for redis cache

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add cache related env vars desc to README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twinid bson key constant

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Update method to cache

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Integrate uuid unification related changes

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Use named arguments in interface method declarations

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add env vars to docker-compose file

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Make parameter names in interface methods and implementations consistent

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Wrap vars and consts in var and const blocks

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-06-05 11:42:16 +02:00
Manuel Imperiale 97f8d65885
MF-739 - Add ID to the User entity (#1152)
* MF-739 - Add ID to the User entity

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Resolve remarks

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Move idp to project root

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use RetrieveByEmail func and UUIDProvider

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm idp.go

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix comment

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rename UserInfo into ViewUser

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix ViewUser naming

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-06-04 22:29:16 +02:00
Ivan Milošević 7f3e2c1b21
NOISSUE - Fix default db name for storage databases (#1194)
* Fix db name in influxdb

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Align db name and namespace from .env with default values  in mongodb and cassandra also

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Rename databases' names to mainflux

Signed-off-by: Ivan Milošević <iva@blokovi.com>

Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2020-06-03 20:33:52 +02:00
Alexander Obukhov 8b004b3daf
NOISSUE - Add `MF_DOCKER_IMAGE_NAME_PREFIX` to Makefile (#1173)
Signed-off-by: Alexander Obukhov <dev@sprql.space>
2020-06-03 20:27:09 +02:00
Manuel Imperiale a7c3cfcf1c
MF-1154 - Move UUID provider to project root (#1172)
* MF-1154 - Move UUID provider to project root

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use naming uuidProvider/up instead of identityProvider/idp

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Mutualize UUID mocks

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Move uuid into pkg directory

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-06-03 18:49:44 +02:00
Ivan Milošević f1ee9d0665
Fix typo in error messages (#1193)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-06-03 17:34:01 +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
Dušan Borovčanin c26c7f34cd
MF-1177 - Implement caching in MQTT adapter (#1187)
* Add auth cache to MQTT adapter

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove unused fields from MQTT adapter

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix removal from Things cache bug

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Use Auth cache naming

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Parse duration instead of int

This is more convenient because duration contains unit.

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove commented code

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove unused environment variables

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update README.md

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove unused code

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix Things mocks

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix README timeouts

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove WS Scheme

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove address from the mProxy target

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-06-02 21:21:30 +02:00
Ivan Milošević a5fb55c328
NOISSUE - Refactor provision tool (#1189)
* Use bulk sdk functions for generating Things and Channels
Add prefix option

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Update readme
Remove dead code
Rename variable

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-06-01 17:34:10 +02:00
Drasko DRASKOVIC 8906943d1d
Prepare 0.11.0 release (#1186)
Signed-off-by: Drasko Draskovic <drasko.draskovic@gmail.com>
2020-05-29 16:05:55 +02:00
Drasko DRASKOVIC a57fb03c01
Add VerneMQ docker image build from source (#1178)
Signed-off-by: Drasko Draskovic <drasko.draskovic@gmail.com>
2020-05-25 12:24:21 +02:00
Darko Draskovic 877005538c
MF-994 - Add tracing middleware for twins and states repos (#1181)
* Add tracing for twin repository

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add state repository tracer

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove unused tracer meant for NATS publisher

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-05-21 13:06:31 +02:00
Darko Draskovic b4c80132e6
MF-995 - Add Twins tests for endpoint list twins and list states (#1174)
* Add ListTwins test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove monotonic time from twins, definitions and attributes creation and update

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Separate twins and states endpoint tests in two files

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add state generation helper funcs to state endpoint tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add createStateResponse() to states test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add states test cases

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Simplify RetrieveAll twins and states methods

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add service.go to mocks

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename mocks.NewService to mocks.New

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add error checking to endpoint state tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix method comment

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add json response decode success check

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove created and updated fields from twin and state res

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove definition fields from twin req and res

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Create funcs to mocks package

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add service save state tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add service list states test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-05-18 18:46:50 +02:00
Dušan Borovčanin d7670e7adb
NOISSUE - Update dependencies (#1176)
* Update dependencies

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix mProxy version

Signed-off-by: dusanb <borovcanindusan1@gmail.com.com>

Co-authored-by: dusanb <borovcanindusan1@gmail.com.com>
2020-05-14 19:09:55 +02:00
Manuel Imperiale df6f5adff8
MF-1163 - Fix influxdb-reader to use nanoseconds precision (#1171)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-05-12 18:19:04 +02:00
Ivan Milošević 5089fccf36
Rename environment variable MF_MQTT_ADAPTER_PORT to MF_MQTT_ADAPTER_MQTT_PORT in docker environment (#1170)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-05-12 14:28:59 +02:00
Darko Draskovic b13a3135dd
Remove thing related code from twins service (#1169)
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-05-07 17:26:34 +02:00
Darko Draskovic 4d9694c027
MF-997 - Add twins service swagger file (#1167)
* Add twins service swagger file

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add TwinRes and TwinsPage definitions

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add StateRes and StatesPage

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add missing response codes

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add name parameter

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-05-07 14:58:23 +02:00
Dušan Borovčanin b8be18129c
MF-1079 - Add MQTT forwarder (#1164)
* Add MQTT forwarder

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Cleanup forwarder code

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use MQTT Publisher in MQTT forwarder

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Cleanup MQTT messaging

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Add Paho client timeout errors

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Simplify MQTT fowarder

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix naming in main method

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use interface and struct instead of function

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use Mainflux errors package

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Rename `tkn` to `token`

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use "/" instead of "." as topic separator

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use async MQTT Publisher

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix timeout errors messages

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Add connect token check

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Rename package alias

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-05-07 09:34:09 +02:00
Mirko Teodorovic f9432c6525
MF-1159 - add gateway metadata update in provision method (#1160)
* provision fix

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update config

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix naming, Boostrap to Bootstrap

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add name as param

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add name as param

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix typo, and remove some props

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add name as param

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add name as param

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix typo

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix typo

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* refactor service

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* improve gateway provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* revert content

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* minor changes

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* change docs, and error in service

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* change docs, and error in service

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-05-06 16:53:32 +02:00
Mirko Teodorovic f482df9033
MF-1055 - rollback/release transaction on error (#1166)
* fix error message

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* release transaction on error

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* reove println

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move defer func up

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* refactor errors handling

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* refactor errors handling

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move defer

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-05-06 15:15:19 +02:00
Manuel Imperiale 16ac44f377
NOISSUE - Use log level error for VermeMQ docker (#1162)
* NOISSUE - Use log level error for VermeMQ docker

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add vermemq ENVARS

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Remove DOCKER_VERNEMQ_ALLOW_ANONYMOUS from docker-compose

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Revert DOCKER_VERNEMQ_ALLOW_ANONYMOUS

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-05-05 16:44:06 +02:00
Manuel Imperiale 2b4cf8a990
NOISSUE - Fix default nats pubsub subject (#1153)
* NOISSUE - Fix default nats publisher subject

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use created timestamp inn transformer

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use created timestamp in transformer

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* rename topic -> subject for nats

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* revert

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* revert

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix subscriber topic

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix timestamp

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use int64 nanoseconds Created timestamp

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add comment to created protobuf field

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm gogo from scripts/ci.sh

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix comment

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Return publisher in NewPublisher

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-05-04 13:14:06 +02:00
Mirko Teodorovic 0c016cd7ce
MF-1125 - Document Provision service (#1143)
* update readme

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update docs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* small changes

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update docs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update docs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update docs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update docs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* minor changes

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* additional paragraphs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* additional paragraphs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* additional paragraphs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add some space

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-05-01 01:31:02 +02:00
Manuel Imperiale f872546925
NOISSUE - Fix bootstrap SDK args naming (#1151)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-29 20:05:08 +02:00
Nikola Marčetić 9d5202c46b
Use VerneMQ default log level (#1150)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-04-29 13:13:40 +02:00
Mirko Teodorovic bf189fbd23
NOISSUE - Update provision service (#1133)
* Add provision service

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* delete sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add provision file

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix envs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix vendor

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* deleete LICENSE

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix modules

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix modules

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix modules

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* refactoring provison service

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test, and use sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove bootstrap mock

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* implement channel

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* export errors

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix tests

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix comments

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix tests

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add new line

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove docker-compse

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add new line

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix load config

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix load config

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* change dflt file

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix content

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* cert sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix bootstraping

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix errors

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update swagger

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix mproxy mod

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix linter messages

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix linter errors

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* upd vendor

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* upd vendor

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove dead code

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add some space for readability

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remov thingids

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* revert readme

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix logging

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake_case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix var naming

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix signature

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* aling with defaults

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix logging info

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix logging

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix tag

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-29 00:39:23 +02:00
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
Manuel Imperiale 36d00d8b9e
Add JSON tags to SDK entities (#1146)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-27 18:49:09 +02:00
Manuel Imperiale 9b4eb7056f
NOISSUE - Update CLI README.md (#1139)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-23 10:24:42 +02:00
Dušan Borovčanin cb3b70d567
NOISSUE - Update mProxy version (#1137)
* Use Events interface in MQTT adapter

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Switch to the new version of mProxy

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Update vendor

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Update mProxy version

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-22 20:41:51 +02:00
Mirko Teodorovic c7a8e75353
fix nginx, channel connect (#1136)
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-04-22 18:59:50 +02:00
Ivan Milošević 9d430fa02c
Remove concurrency flag for golangci-lint (#1134)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-21 19:49:37 +02:00
Manuel Imperiale 7a18d3fa56
MF-1088 - Remove message payload content type (#1121)
* MF-1088 - Remove message payload content type

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add default contentFormat

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-21 19:33:11 +02:00
Manuel Imperiale ccbfe20607
MF-1129 - Use snake_case for Lora and OPC-UA metadata fields (#1130)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-21 17:49:17 +02:00