Commit Graph

70 Commits

Author SHA1 Message Date
Ivan Milošević 3eca6920e1
NOISSUE - Add health check for MQTT broker (#1305)
* Add health check

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* update readme
use constants

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* close body after each HEAD request

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* log and close health check response body

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* use healthcheck endpoint instead ping for docker healthcheck

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove for loop, only one check and exit if failed healthcheck

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* changed cmd for healthcheck
new version of verne image

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* use false instead exit 1

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* return for loop

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* review

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* add continue after unsuccesful http.get

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Use backoff package

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* extracting healtcheck function outside main()

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* go mod vendor

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* go mod tidy

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* go mod vendor

Signed-off-by: Ivan Milosevic <iva@blokovi.com>
2021-01-05 19:45:09 +01:00
Mirko Teodorovic d2af0602a0
NOISSUE - Fix dates not being init properly on save, change path construction, replace UUID with ULID for group ID (#1300)
* fix path, group saving with parent

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

* change path, enable name change

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

* revert changes for port

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

* replace UUID with ULID

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

* add ulid

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

* fix migrations

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

* revert user groups

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

* add ulid provider

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

* enable group name change

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

* use null string for parent id

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

* remove migrations, disable group delete if group not empty

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

* revert docker compose

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

* add ulid provider

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

* remove dash character replacment

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

* add ulid lib

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

* rename UUIDProvider

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

* rename package alias

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

* remove unused error

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-12-17 17:08:28 +01:00
Mirko Teodorovic fbba7aaa1a
MF-1248 - Add access policies for users (#1246)
* authz service init

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

* authz service init

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

* add proto

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

* add proto

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

* authorize method

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

* add casbib

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

* add casbib

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

* add casbib

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

* add policy grpc

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

* add policy grpc

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

* fix db connection, add environment variables, docker-compose

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

* add model.conf policy

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

* add model.conf policy

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

* fix test

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

* adding tests, and token for auth

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

* revert changes

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

* fix auth service

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

* small changes, add model conf env var

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

* remove users grpc for now

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

* fix error

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

* some cosmetics

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

* resolvin minor comments

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

* change endpoint, add file to fix test

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

* fix docker env

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

* fix alignment and path for model.conf

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-12-08 17:04:09 +01:00
Ivan Milošević bc41c32cf5
update mproxy version (#1251)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-10-09 01:55:09 +02:00
Dušan Borovčanin f10e49e6b5
MF-928 - Change CoAP lib (#1233)
* Switch CoAP lib

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

* Revert removed adapter code

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

* WIP CoAP refactor

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

* Add auth key

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

* Fix observers map

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

* Fix reading message body

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

* Fix subtopic parsing

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

* Fix error handling

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

* Fix multi-protocol communication

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

* Separate client from observer

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

* Remove unused config

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

* Remove TCP option

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

* Inline error check

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

* Add logging client errors

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

* Replace RWMutex since we're not using RLock

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

* Inline error handling

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

* Inline error handling

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2020-09-22 11:59:10 +02:00
Al Hoang e272d9f7ad
MF-435 - Add support for env file loading (#1223)
* NO-ISSUE - add support for env file loading

Signed-off-by: Al Hoang <hoanga@gmail.com>

* update go mod

Signed-off-by: Al Hoang <hoanga@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-09-07 15:45:36 +02:00
Mirko Teodorovic b91024465c
MF-1179 - Add a certificate service and certs endpoint to SDK (#1188)
* adding certificate issuing

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

* adding cert endpoint

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

* update envs

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

* update envs

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

* move certs creation to sdk

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

* move certs creation to sdk

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

* move certs creation to sdk

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

* fix env vars

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

* add comment

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

* update sdk

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

* fix vars

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

* add volumes

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

* fix merge config for int

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

* remove env

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

* fix error handling

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

* add cert test, change receiver to pointer

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

* add docs

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

* fix var naming

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

* correct error naming

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

* adding certs service

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

* add certs

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

* add certs

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

* change func receiever

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

* add default cert issue method

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

* add config

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

* small fix

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

* remove some testing code

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

* add cert issue

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

* add vault api client

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

* additional endpoints

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

* add swagger for certs

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

* remove certs from provision

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

* clean provision from certs

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

* add list certificates endpoint

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

* add vault api in vendor

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

* add certs

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

* add revoke, fix bugs

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

* fix sdk for certs

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

* minor changes, add env, doc

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

* minor changes, add env, doc

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

* minor changes, add env, doc

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

* small changes

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

* remove CA for signing from provision

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

* add docker file for certs

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

* fix mock sdk

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

* add line

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

* fix RevokeCert

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

* renam ENV

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

* remove tests temporarily

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

* fix naming

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

* renam vars

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

* add cli for issue cert

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

* add cli for issue cert

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

* add cli for issue cert

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

* add cli for issue cert

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

* remove not needed envs

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

* fix linter errors, add cli

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

* fix linter errors, add cli, var rename

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

* fix reviews, add viewcert, fix view all certs

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

* remove view cert, as it will be retrieved from PKI

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

* change endpoints

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

* add default env val

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

* remove some errors

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

* refactor, make wrapper lib for vault

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

* refactor, make wrapper lib for vault

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

* refactor, make wrapper lib for vault

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

* fix revoking

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

* refactor, make wrapper lib for vault

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

* update vendor

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

* fix comment

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

* add comments

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

* remove unused

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

* remove unused field

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

* update vendor

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

* refactor pki

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

* refactor pki

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

* refactor pki, update vendor

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

* refactor pki

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

* fix comment

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

* minor fix

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

* remove methods, use fields

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

* fix comments and package desc

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

* fix comments and package desc

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-07-21 12:53:21 +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
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
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 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
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 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
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
Nikola Marčetić 70955d1937
NOISSUE - Enable MQTT over WS in docker composition (#1085)
* Enable WS over MQTT docker composition

Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>

* Remove commented code

Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-03-25 22:26:50 +01:00
Nikola Marčetić 6ffa916ed2
Update mqtt adapter imports (#1081)
* Fixed mqtt adapter imports

Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>

* PR remakrs resolved

Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-03-24 11:07:41 +01:00
Dušan Borovčanin ba97e865a4
NOISSUE - Add Publisher field to MQTT adapter (#1067)
* Add publisher field to the message

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

* Update SenML lib

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-03-10 11:44:48 +01:00
Dušan Borovčanin 63dc1f69b6
Update mProxy (#1058)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-03-04 15:25:09 +01:00
Dušan Borovčanin 1c6f124062
MF-1053 - Add disconnect event to MQTT adapter (#1056)
* Add disconnect event to mProxy

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

* Rename publishers to pubs

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

* Use acync publishers

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-03-03 19:23: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
Dušan Borovčanin 8c4da85039 MF-950 - Runtime error in normalizer - CBOR SenML (#974)
* Add Transformer tests

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

* Fix readers and writers

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

* Fix README typo

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

* Tidy vendor

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

* Remove link field from docs

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-11-29 20:47:28 +01:00
Aleksandar Novaković 263108cc85 Migrate from dep to go modules (#971)
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-11-27 15:29:34 +01:00
Dušan Borovčanin cdf9347b01 NOISSUE - Update Protobuf version (#902)
* Update Protobuf version

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

* Update gRPC version

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-10-22 20:33:44 +02:00
Manuel Imperiale e16a025fba
MF-886 - Add OPC-UA adapter (#878)
* NOISSUE- Add OPC-UA adapter

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

* NOISSUE - Add opc-adapter PoC, docker and vendor

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

* Convert OPC messages to SenML

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

* Add gopcua package

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

* lora-adapter typo

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

* Add OPC Reader

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

* Typo fix

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

* Typo fix

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

* Update copyright headers

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>

* Add opc config

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

* Add all opc envars in the config

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

* Config typo

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

* Add route map

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

* Use opcua package instead of opc

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

* Fix OPCUA typo

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

* Rm MQTT sub

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

* Move interefaces to root

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

* Fix revieews and typo

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

* Update Gopkg.toml

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

* Add all envars into .env

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-10-22 17:44:19 +02:00
Dušan Borovčanin 873ef4c96f NOISSUE - Simplify MQTT benchmarking tool (#852)
* Fix user creation

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

* Extract client creation to separate method

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

* Remove message generating in separate goroutine

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

* Remove runSub and runPub methods

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

* Refactor benchmark code

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

* Fix typos

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

* Update client message handling

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

* Fix microseconds typo

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

* Simplify client

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

* Don't take zero-messages clients int count

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

* Fix token timeout condition

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

* Add timeout for publisher

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

* Update Paho lib version

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

* Temporary drop SenML and subscribe support

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

* Calculate payload size

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

* Remove templates

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-09-25 19:02:29 +02:00
Aleksandar Novaković b83439fcc2
Update gorilla websocket version (#865)
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-09-18 18:25:18 +02:00
Mirko Teodorovic 19834dfc51 MF-295 add mqtt benchmark tool (#817)
* adding mqtt benchmark tool

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

* adding mqtt benchmark tool - vendoring

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

* add mtls support

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

* update readme

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

* tool for channel provision, reorganize code

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

* adding config toml

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

* tool for channel provision, adding ssl cert gen

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

* add config toml

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

* add readme for provision

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

* update readme

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

* remove some printing

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

* add test configs

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

* remove some dead code, and sort comments

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

* replace statistics lib

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

* replace statistics lib

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

* add cobra and viper

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

* styling changes

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

* styling changes

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

* styling changes

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

* remove statistic lib

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

* change type visibility

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

* remove empty line

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

* update vendor

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

* update deps

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

* rename variable

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

* small changes, adding comments

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

* error handling

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2019-08-13 12:56:31 +02:00
Aleksandar Novaković b95bb82e0b Fix users service to work in offline mode (#795)
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-07-19 12:28:45 +02:00
Aleksandar Novaković 61f1c2e379 MF-399 - Add open tracing support (#782)
* Add open tracing dependencies

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Add open tracing to users service

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Add open tracing to the things service

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Add open tracing to the http adapter

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Add open tracing to the ws adapter

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Add open tracing to the CoAP adapter

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update LoRa adapter in accordance with changes

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update SDK tests in accordance with changes

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update bootstrap service in accordance with changes

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update reader services with accordance with changes

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update .env and docker-compose file

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Add jaeger and timeout env vars

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Fix broken test for can access by id endpoint

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update deps with proto empty package

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-07-18 15:01:09 +02:00
Dušan Borovčanin 4a7af7c0b3 NOISSUE - Fix CoAP adapter (#779)
* Fix CoAP mux

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

* Remove prints and commented code

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-07-15 17:49:02 +02:00
Aleksandar Novaković 3125f0bbc2 MF-722 - Change UUID lib (#746)
* Update uuid package and update things serivce

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update bootstrap service tests

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update existing postgres writer tests

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-05-16 13:35:13 +02:00
Aleksandar Novaković 5e5fe88927 MF-708 - Assign Writer(s) to a channel (#737)
* Add support for channel filtering using config

Add support for channel filtering using yaml configuration files
for writers.

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update writers documentation with new env var

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add info comment to configuration file

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix configuration and update yaml dep

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update config from yaml to toml

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2019-05-10 14:36:27 +02:00
Aleksandar Novaković 5799356b14 MF-549 - Change metadata format from JSON string to JSON object (#706)
* Update metadata type in things service

Update things service so that metadata has map type. Update repo
implementation by adding sqlx lib.

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add sqlx lib to bootstrap service

Add sqlx lib to bootstrap service and update metadata field type.

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update metadata in redis streams consumer

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update tests for bootstrap service

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix mongo reader logging and driver version

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix mongo reader and writer

Fix mongo reader and writer by updating driver version.

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update SDK with new metadata format

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update LoRa adapter with new metadata format

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update users service in order to use sqlx

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Replace anonymous struct with map

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update docs for LoRa adapter

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix LoRa application metadata format

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix metadata format in LoRa docs

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add metadata2 var to SDK things test

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2019-04-16 14:58:56 +02:00
Aleksandar Novaković bd00c5fa13 NOISSUE - Fix event sourcing client on LoRa adapter (#527)
* Fix event sourcing client on LoRa adapter

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix tests for things redis streams

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2019-01-07 23:54:18 -02:00
Manuel Imperiale 5f6bbf4b0a MF-419 - Use JSON for CLI commands output (#504)
* MF-419 - Use JSON for CLI commands output

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

* dep ensure

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

* Remove accidentaly added CLI binary

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

* Fix cast

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

* Fix review

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

* Typo fix

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

* Use logCreated for token command

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

* Fix review

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2018-12-16 14:01:37 -05:00
Drasko DRASKOVIC 9725c2723d
MF-486 - Add provisioning command to CLI (#487)
* MF-486 - Add provisioning command to CLI

Resolves #486

Signed-off-by: drasko <drasko.draskovic@gmail.com>

* Add error check on file open

Signed-off-by: drasko <drasko.draskovic@gmail.com>

* Add provision test to CLI

Signed-off-by: drasko <drasko.draskovic@gmail.com>

* Update error handling

Update CSV file.

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

* Fix provision for new SDK

Signed-off-by: drasko <drasko.draskovic@gmail.com>

* Correct structs and sprintfs

Signed-off-by: drasko <drasko.draskovic@gmail.com>

* Check array length

Signed-off-by: drasko <drasko.draskovic@gmail.com>

* Correct sprintf. Update dep lock file.

Signed-off-by: drasko <drasko.draskovic@gmail.com>
2018-12-08 16:59:55 +01:00
Manuel Imperiale 21ab52576c MF-166 - Add lora-adapter service (#481)
* MF-166 - Add lora-adapter service (#416)

* MF-166 - Add lora-adapter service

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

* Fix NATS connexion and use credentials with gRPC

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

* Forward lora msgs to nats

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

* Add make cmd and docker-compose

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

* Define lora conf as private

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

* Rename funcs fix nats conn

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

* Update README and fix reviews

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

* Rm NATS sub

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

* MF-166 - Add lora-adapter service  (#461)

* MF-166 - Add lora-adapter service

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

* Fix NATS connexion and use credentials with gRPC

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

* Forward lora msgs to nats

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

* Add make cmd and docker-compose

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

* Define lora conf as private

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

* Rename funcs fix nats conn

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

* Update README and fix reviews

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

* Rm NATS sub

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

* Fix lora server topic and logs

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

* Fix HTTP port

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

* NOISSUE - Add event sourcing client to LoRa adapter (#471)

* Add event sourcing client to LoRa adapter

Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>

* Update redis version in docker compose and update env vars

Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>

* Add ES subscription to main LoRa function

Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>

* Add new env vars to readme file of LoRa adapter

Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>

* Add message acknowledgement to LoRa adapter

Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>

* Add handling of empty values to event sourcing client (#474)

Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>

* Add routemap and handle event sourcing

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

* Fix eventStore decoding

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

* Mv docker-compose in docker/addons

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

* Fix routemap and logs

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>

* Update Gopkg.toml

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

* Fix reviews

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

* Fix route map and typos

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

* Update README

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 reviews

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

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2018-12-04 20:08:30 +01:00
Dušan Borovčanin ec0a148ad4 MF-443 Update project dependencies (#444)
* Update project dependencies

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

* Update InfluxDB and Cassandra versions

Update InfluxDB and Cassandra versions in docker-compose file as well as
images version in tests.

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

* Update gRPC version

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

* Make name first value of constraints

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2018-11-07 10:18:57 +01:00
Dušan Borovčanin dfa766e013 MF-407 - Values of zero are being omitted (#434)
* Fix empty protobuf values

Update Normalizer service and .proto files. Reader and Writer services
needs to be updated due to message format change.

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

* Update HTTP adapter to use gogo protobuf

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

* Update Reader services API

Update API or Reader services to match Message changes due to switching to gogo/proto.

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

* Update InfluxDB services

Update InfluxDB Reader and Writer services to match new Message format.

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

* Update MongoDB services

Update MongoDB Reader and Writer services to match new message format.

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

* Update Cassandra services

Update Cassandra Reader and Writer service to match new Message format.

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

* Fix InfluxDB Reader test

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

* Update Makefile and docs accordingly

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

* Fix possible data race in InfluxDB writer

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

* Update InfluxDB Writer tests

Raise test coverage.

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

* Fix InfluxDB reader

Fix wrong ValueSum readings. Upadete tests and raise coverage.

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

* Update MongoDB services tests

Raise test coverage for MongoDB Reader and Writer services.

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

* Update Readers API tests

Raise test coverage.

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

* Raise test coverage

Update Cassandra Reader and Writer services tests.

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

* Use gogo/protobuf in CoAP adapter

Add gogo/protobuf to Gopkg.toml and update dependencies.
Update Dockerfile to run `make proto`.

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

* Update Cassandra Reader tests

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

* Refactor code

Improve code style and comments to improve readability.

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

* Rename Sum to SumValue

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

* Rename Values to Value

Since message contains only single value (or possibly no value at all),
`Values` name could be misleading. Rename simple double value from
`Value` to `FloatValue` accordingly.

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

* Fix InfluxDB Reader logging

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

* Replace exclusive if statements with switch-case

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

* Update Cassandra services tests

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2018-11-05 19:18:51 +01:00
Dušan Borovčanin d6755e4a72 MF-374 - Bring back CoAP adapter (#413)
* Bring old CoAP code back

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

* Fix channel ID formatting due to type change

Uncomment error handling for authorization.

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

* Update CoAP adapter docs

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

* Add copyright headers

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

* Remove redundant type declaration

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

* Add CoAP adapter to the list of services

Add CoAp adapter in Makefile services list and fix corresponding documentation.

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

* Refactor CoAP code

Merge multipe `const` block int single and declare consts before vars.
Un-export notFound handler since there is no need to export it.

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

* Update http version endpoint

This separates CoAP and HTTP APIs.

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

* Refactor CoAP POST method handling

This PR is a part of CoAP adapter refactoring that will simplify adapter implementation.

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

* Refactor CoAP adapter

Change CoAP message handling to simplify adapter implementation.

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

* Add backoff timeout for server ping to client

Update CoAP adapter to provide subset of necessary features from
protocol specification.

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

* Fix leaking locked goroutine

In case of the stopped ticker, its channel is NOT closed, so pinging might be left stuck waiting for the stopped ticker to send a notification.

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

* Format code

Use more meaningful name for Handlers map.

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

* Use and stop ticker from the same goroutine

Stop handler Ticker from ping goroutine rather than the cancel goroutine.

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

* Check if subscription already exists in put method

Fix potential leak of handlers providing check inside of put method.

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

* Use MessageID as Observe option

Since MessageID satisfies observe option behaviour, use Message ID
instead of local timestamp. Remove Thicker from handler and use it on
transport layer.

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

* Use name Observer insted of Handler

Name `Observer` is used in protocol specification, so this naming makes
code more self-documenting.

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

* Add CoAP adapter to docker-compose.yml

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

* Add copyright headers

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

* Remove unused constants

Fix service name in startup log message.

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

* Add metrics endpoint

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

* Refactor code

Config fields from main.go should not be exported; minor style changes.

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

* Update authorization URI-Query option

Use `authorization` value in URI-Query option instead of `key`. This
mimics Authorization header in some other protocols (e.g. HTTP). Please
note that this value can be replaced with simple `auth` to save space,
due to constrained URI-Query option size.

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2018-10-31 18:53:25 +01:00
Aleksandar Novaković 0c77d84176 MF-382 - Improve performance by adding Redis cache for message auth (#383)
* Add redis caching for thing and channel connections

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix authorization caching flow

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update things documentation

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2018-09-04 22:19:43 +02:00
Aleksandar Novaković 58cdf2cddc MF-312 - Implement basic MongoDB reader (#344)
* Add mongodb reader service

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add tests for mongodb reader service

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add documentation for mongodb reader service

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix test function name

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Update comment in docker-compose for mongodb-reader service

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2018-08-08 13:38:34 +02:00
Manuel Imperiale b090aa3e02 MF-216 - Integrate Bashflux into monorepo (#308)
* MF-216 - Integrate Bashflux into monorepo

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

* Rename clients -> things

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

* Fix FormatResLog

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

* Initialize Channels commands in channels.go

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

* Mv bashflux to cmd/ repertory

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

* Mv API commands files to bashflux repertory

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

* Initialize Users commands in users.go

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

* Initialize Version command in version.go

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

* Initialize Messages command in messages.go

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

* Rm bashflux .gitignore and mv commands to root .gitignore

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

* Rename API commands vars

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

* Fix certificates paths

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

* Rm test logs

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

* Remove get channels cmd without arguments

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

* Fix connect and disconnect commands

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

* Fix messages endpoint

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

* Rm useless comments and dead code

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

* Use contentTypeSenml var

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

* Rename cmdCobra -> cmd

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

* Rm else statments

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

* Rename SetServerAddr function vars

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

* Rename conf parameters

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

* Rename main with proper name

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

* Fix Update channel comment

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

* Fix README

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

* Rm .DS_Store from .gitignore

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

* Rename hhtp_client.go -> http.go

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

* Rm DeleteAllChannels and DeleteAllThings funcs

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

* Fix BF users usage log

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

* Improve bashflux logs

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

* Share types in funcs

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

* Typo fix

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

* Fix BF version cmd

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

* Set certs paths via env variables

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

* Fix package

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

* Rm not direct dependencies from Gopkg.toml

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

* Fix README

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

* Add def prefix to certificates paths

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

* User thiings service for version cmd

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

* Rename GetReqResp -> SendRequest

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

* Fix version help

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

* Return directly the pointer in NewVersionCmd

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

* Define endpoints names as consts and be consistent with naming

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

* Use Spintf for string concatenation

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

* typo fix

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

* Fix README

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

* Fix version endpoint

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

* Fix serverAddr

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2018-07-11 13:53:37 +02:00
Dušan Borovčanin f1537528f9 NOISSUE - Raise test coverage (#324)
* Update WS tests

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

* Use require in all writer tests

Refactor code.

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

* Ignore Mainflux generated pb.go files

Ignore *.pb.go files generated by Mainflux, but don't ignore vendored generated code.

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

* Return an exported ErrNotFound instead of the unexported one

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

* Update mocks to match the actual behaviour

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

* Update mocks error message

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

* Add auth service unavailable error test

Since this error is caused by gRPC server returning codes.Internal,
this behaviour is simulated using specific token. When that token is
passed as an auth header, the mock gRPC client returns aforementioned error.

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

* Use require package for postgres tests

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

* Remove redundant error checks in tests

Refactor tests.

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

* Rename error flag token

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2018-06-16 02:30:46 +02:00
Aleksandar Novaković 426f59d392 MF-235 - Add support for storing messages in Cassandra (#321)
* Add Cassandra writer implementation

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add cassandra service with version and metrics endpoints

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add test for cassandra writer

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Exclude api.go files from code coverage

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add readme file for cassandra writer

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add docker compose configuration for cassandra writer

Add README file. Add docker compose configuration.

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add gocql as project dependency

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Fix init script for cassandra in docker-compose

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add testifies require subpackage

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2018-06-08 14:25:55 +02:00
Darko Draskovic 2b393ad50f MF-237 - Add support for storing messages in MongoDB (#307)
* Add mongodb-writer

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

* Add official mongodb driver

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

* Move Connect to main.go

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

* Remove bson.NewDoc and write msg directly in db

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

* Add MongoDB writer tests

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

* Update README.md

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

* Add mongodb services compose to addons dir

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

* Update docs

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

* Update docs and tests

Refactor code.

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

* Expose MetricsMiddleware to align writers with other services

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

* Add logging middleware

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

* Update load tests version

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2018-06-01 15:50:23 +02:00
Dušan Borovčanin f0cbc47ee6 MF-236 - Add support for storing messages in InfluxDB (#283) 2018-05-21 16:28:52 +02:00
Dejan Mijić e0e2b2aad0
MF-269 - Replace UUID with BIGSERIAL as primary key (#291) 2018-05-21 12:51:46 +02:00
Dejan Mijić bca3d0774f
MF-201 - Replace ORM with SQL (#265) 2018-05-11 01:00:10 +02:00
Aleksandar Novaković 816c172823 MF-164 - Split manager service (#266) 2018-05-10 23:53:25 +02:00