* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>