Commit Graph

1288 Commits

Author SHA1 Message Date
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
Ivan Milošević eb9092494e
MF-1128 - Add golangci-linter to a CI script (#1131)
* Add golangci-linter to CI script

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

* add no-config flag

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

* disable staticcheck

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

* disable all except errcheck

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

* add more linters

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

* add verbose flag for debug
decrease concurrency to 1

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

* remove errcheck and verbose flag

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

* enable just golint

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

* fix lint errors

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-21 17:05:19 +02:00
Dušan Borovčanin 88fa724fc3
MF-1123 - Move Provision service to monorepo (#1132)
* Add provision service

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

* Fix Provision service initial version

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-21 16:05:11 +02:00
Manuel Imperiale 7910d64ad4
MF-845 - Add FOSSA badge for licensing (#1127)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-20 18:21:55 +02:00
Manuel Imperiale 01aa4190c5
MF-1087 - Remove WebSocket adapter (#1120)
* MF-1087 - Remove WebSocket adapter

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

* Rm all ws directory

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

* Revert authorization.js

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

* Remove /ws endpoint from ssl/authorization.js

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

* Rm gorilla from vendor

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

* Revert gorilla to vendor

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-17 13:16:21 +02:00
Manuel Imperiale f982b8ccc6
NOISSUE - Use HTTP Status in SDK error messages (#1119)
* NOISSUE - Use HTTP Status in SDK error messages

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

* Add helper function to create errors

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

* Fyx Typo

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

* Revert ErrNotFound

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

* Rm InvalidArgs and NotFoundound errors from SDK

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-16 14:45:28 +02:00
Manuel Imperiale 7d839b7b61
NOISSUE - Fix bootstrap token naming and interfaces named args (#1117)
* NOISSUE - Fix bootstrap token naming and interfaces named args

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

* Fix CI bot

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

* Use owner for repository layer

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

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-16 12:32:21 +02:00
Manuel Imperiale 6bd74575ff
MF-1115 - Improve the SDK error encoding (#1118)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-15 23:41:31 +02:00
Manuel Imperiale 4c970a8079
MF-862 - Add boostrap CRUD to SDK and CLI (#1114)
* MF-862 - Add boostrap CRUD to SDK and CLI

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

* Revert ReaderPrefix

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

* Fix reviews

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

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-15 17:38:20 +02:00
Manuel Imperiale b8bd011f9d
NOISSUE - Update coding style in Things service (#1116)
* NOISSUE - Update coding style in Things service

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

* Fix things.Page

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-15 15:15:30 +02:00
Alexander Obukhov fbbf2c07a5
NOISSUE - Remove defers from TestMain (#1111)
Defers will not be run when using os.Exit (https://github.com/golang/go/issues/34129)

Signed-off-by: Alexander Obukhov <dev@sprql.space>
2020-04-14 14:47:34 +02:00
Manuel Imperiale 5b5229975b
NOISSUE - Create func to encode SDK errors (#1110)
* NOISSUE - Create func to encode SDK errors

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

* Use var declaration

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-14 11:04:33 +02:00
Manuel Imperiale d8dca28072
MF-1078 - Add timestamp to published messages and use it in Transformer (#1106)
* MF-1078 - Add reception time to published messages and use it if SenML time is missing

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

* Fix comments

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

* Add message timestamp

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

* Fix pub

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

* Mv timestamp to service layer

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

* Revert WS

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

* Fix coap

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

* Fix CI bot

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

* Rename Timestamp Created

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

* Mv Created field to message creation

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

* Mv Created field to message creation

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

* Use UnixNano

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

* Use google.protobuf.Timestamp

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

* Add protoc-gen-gogo and gogoproto to CI script

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

* Use TimestampProto to generate timestamp

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-13 15:05:05 +02:00
Ivan Milošević 537d73d0c6
Fix prometheus namespace in postgres reader & writer (#1109)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-13 14:01:59 +02:00
Ivan Milošević 880e193b0a
NOISSUE - Implement errors package in senml transformer, readers and writers (#1108)
* Implement errors package in senml transformer, readers and writers

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

* Remove unused const
Return wrapped error in postgres writer

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

* fix default db host in postgres writer

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

* fix capital letters in errors messages

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

* use svcName instead of postgres for Promethius initialization

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-13 12:57:53 +02:00
Ivan Milošević e438be4250
NOISSUE - Implement errors package in Authentication service (#1105)
* Implement errors package in Authn service

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

* remove imported and not used fmt package

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

* wrapped errors when issued new key

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

* remove blank line

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

* Change error message in tests
Remove nil case in encode error

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

* return back nil value error handling

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-10 17:43:42 +02:00
Dušan Borovčanin 57f7ee2595
MF-1103 - API key should ignore empty expiration time (#1104)
* Fix API keys expiration validation

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

* Fix API docs

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-07 14:32:02 +02:00
Manuel Imperiale 6c39c85cc8
MF-1096 - Fix AuthN and Things Auth ENVARS (#1066)
* NOISSUE - Fix AuthN and Things Auth ENVARS

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

* Add DB envars to env.go

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

* Fix envars

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

* Add DefLogLLevelError

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

* Fix DB names

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

* Fix DB names

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

* Fix DB names and HTTP ports

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

* Fix .env

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

* Revert writers DB names

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

* Rm unused Twins envars

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

* Fix reviews

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

* Fix reviews

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

* Fix typo

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

* Remove definitions from env.go

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

* Revert HTTP gRPC ports

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

* Use default NATS URL as string

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

* Fix reviews

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

* Revert default ports

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

* Fix typo

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

* Fix cassandra ENVARS

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

* Fix cassandra reader ENVARS

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

* Fix readers and writers envars

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

* Fix readers and writers .env

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

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-07 12:02:17 +02:00
Ivan Milošević 338c55e554
fix Contains function for nil arguments (#1102)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-07 10:35:38 +02:00
Manuel Imperiale 382bc89161
MF-1099 - Add email subdomain validator (#1101)
* MF-1099 - Add email subdomain validator

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

* Add unlimited sub domains

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

* Fix users tests with error nil

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

* Revert users test

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-07 10:16:46 +02:00
Manuel Imperiale 8325c1caf6
MF-1091 - Use channels. as broker prefix (#1098)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-06 12:30:26 +02:00
Manuel Imperiale 1d78233fe6
MF-1090 - Use named Interfaces args (#1097)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-05 13:15:47 +02:00
Manuel Imperiale fff492bd50
NOISSUE - Create broker package for NATS (#1080)
* NOISSUEE - Create broker package for NATS

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

* Create funcs to return NATS connection

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

* mv os.exit to main

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

* Fix Reviews

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

* Fix tests and typos

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

* Fix CI

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

* Fix reviews

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

* Unify Publisher and Subscriber interfaces

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

* Rename Nats interface

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

* typo

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

* Mv message.pb.go, messsage.proto and topics.go to broker directory

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

* Fix go.mod

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

* Use mainflux broker for writers and twins services

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

* Fix go.mod

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

* Fix twins tests

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

* Fix make proto

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

* Fix message.proto

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

* Fix golangcibot

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

* regenerate message.pb.go

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

* Fix comment

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

* Fix comment

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

* Fix make proto

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

* Add NATS errors

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-01 21:22:13 +02:00
Ivan Milošević 51ec256664
NOISSUE - Implement errors package in bootstrap service (#1093)
* implement errors in bootstrap service

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

* remove dead code

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

* change errors messages

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

* edit more errors messages

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-04-01 15:54:26 +02:00
Manuel Imperiale c20b43ed41
NOISSUE - Fix writers loadSubjectsConfig if file is missing (#1094)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-01 14:40:59 +02:00
Jonathan Dreyer 46aadcfd9d
NOISSUE - Adding subtopics filtering in writer services (#1072)
* Add feature of filtering by subtopics in writer

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Fix mistake

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Refactoring writer sevices

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Rename variables related to filter (channels & subtopics)

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Set default value of filtering when configuration file doesn't exist

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Add a blank line at the end of the file

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Refactor loading filters configuration (moving into writer package, merge both loading methods & returning error)

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Remove useless log

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Change type of variables (channels & subtopics) and simplify loading method

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Add logging error when loading filters

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Simplify return configuration in loading method

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Merge both filter files into one file

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Move loading subjects into writer package

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Add subscribe to selected subjects

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Edit README of writer services

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Keep only subscribe loop

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Use full NATS subjects

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

* Edit comment in subjects files

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2020-03-30 18:24:27 +02:00
Ivan Milošević d2153a8846
[NOISSUE] - Improve errors package (#1086)
* Init commit - implement errors package on things service

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

* things service errors issue

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

* Decode errors
Add authn service to run script

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

* Modify tests

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

* service_test

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

* debug lines

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

* Regulate tests

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

* Improve errors in Redis

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

* Remove dead code
Inline if conditions
Rename err var

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

* Transform errors messages to lowercase

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

* improve errors package

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

* modify wrap method
inline wrapping errors in redis

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

* Add copyright to errors package

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

* wrapping nil error returns wrapper (instead of nil)

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

* move response messages in test to vars

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

* golangcibot review fix

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

* golangbot fix review in transport

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-03-30 15:22:18 +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
Manuel Imperiale c1df2cb21c
NOISSUE - Rm unused opc-ua envars (#1083)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-03-25 16:56:57 +01:00
Vadim Filin b8818c4dd2
MF-798 - Add utf8 support for email validation (#1082)
* Add utf8 support for email validation

Signed-off-by: Vadim Filin <phil192@yandex.ru>

* Fix review comments

Signed-off-by: Vadim Filin <phil192@yandex.ru>

* Refactor

Signed-off-by: Vadim Filin <phil192@yandex.ru>

Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2020-03-25 15:30:20 +01:00
Ivan Milošević a2d70c8907
Remove unused Tokenizer interface (#1084)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-03-25 10:29:48 +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
Darko Draskovic 19503742a6
NOISSUE - Update state based on SenML time value (#1075)
* Update state based on SenML time value

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

* Use Modf to parse SenML rec time

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

* Add Update to State in mocks

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

* Add Delta to Twin Definition and iota consts for state actions

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

* Use action consts for switch statement

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-03-18 19:56:39 +01:00
Manuel Imperiale c91fe0d453
NOISSUE - Fix StatusBadDecodingError for opc-ua browse (#1074)
* NOISSUE - Fix StatusBadDecodingError for opc-ua browse

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

* Reduce number of browse childrens level

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-03-14 20:09:02 +01:00
Darko Draskovic 3e4a9eb16a
Save senml array msg to multiple states (#1073)
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-03-13 16:20:57 +01:00
Manuel Imperiale b3f91f5c9e
NOISSUE - Fix opc-ua message type handling (#1071)
* NOISSUE - Fix opc-ua message type handling

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

* Add comments

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

* Fix reviews

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

* Fix typo

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

* Return error

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-03-12 11:20:05 +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
Manuel Imperiale cc5e0288df
NOISSUE - Fix users CLI (#1062)
* NOISSSUE - Fix users CLI

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

* Fix README

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

* use Mainflux entities

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

* Mv ConnectionIDs to requests

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-03-09 11:31:19 +01:00
Manuel Imperiale 6e4e5b351a
NOISSUE - Fix SDK Messages response (#1064)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-03-07 05:02:26 +01:00
Drasko DRASKOVIC d587921eda
Merged MQTT docker compose in core composition file (#1060)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-03-05 13:34:07 +01:00
Manuel Imperiale 7df2ababc4
MF-1016 - Add UserUpdate and UpdatePassword to sdk and CLI (#1057)
* MF-1016 - Add UserUpdate and UpdatePassword to sdk and CLI

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

* Update READMEs

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-03-04 18:37:41 +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