* Expose the InfluxDB and Cassandra ports to host
Expose the InfluxDB's HTTP API port 8086 and Cassandra's CQL port 9042 from the containers
to the host machine, in order to enable easier exploration of the data stored in the databases
from the host machine and development of apps which connect and use the data stored in the databases.
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
* Port exposing cleanup in docker-compose.yml files
There were some doubled configurations for port exposing with the expose and ports directives in the docker-compose.yml files which had to be cleaned.
Signed-off-by: Jovan Kostovski <chombium@gmail.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>
* Refactor Mainflux go SDK
Add structures instead of string parameters. Add offset and limit
parameters to things and channels methods. Add better configuration
support.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add new public errors with better error handling
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SDK to use uint instread of string id
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update cli to use new SDK API
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Remove TLS termination from nginx configuration
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SDK documentation and structures
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Refactor things service
Decouple HTTP layer from business logic. Remove ID number validation
check. Remove models from HTTP requests and responses.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Reformat tests for things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Increase test coverage for things service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add batch of streams
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add env variables for batch point setup
Fix InfluxDB reader tests.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update Compose and Kubernetes config
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update env variables
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove unused const
Refactor code and docs.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Handle NewBatchPoints error
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Reduce wait time in batch save test
Fix typos.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update tests
Use single test with multiple cases to test single point save as well as
a batch of points.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add an explanation for not resetting ticker
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add development Docker images build
Add Dockerfile.dev and target in the Makefile to provide much faster image
building for `development purposes`.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Build single service in dev mode
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Makefile
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix dev-guide
Signed-off-by: Dušan Borovčanin <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 InfluxDB reader
Summary:
- Add basic reader features
- Update Makefile
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Raise test coverage
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update README.md and docker composition
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix docker-compose.yml
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove exposed ports
Ports are already exposed by mapping, so no need to explicity expose them.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@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>
* Fix logger message in http service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Inline query and error handling in cassandra writer
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix comments and import statement in writer interface
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add reader common interface and shared HTTP API
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add Cassandra reader implementation
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add tests for cassandra reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add swagger doc and readme for readers
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update make file
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add docker-compose configuration for cassandra reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add readme file to cassandra reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add redis for message persistence
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add redis to docker composition
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix mqtt publish command in documentation
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update documentation with new environment variables
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@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>
* Rename services, stores, environments and models
Rename services, stores and models to match naming change from `clients` to `things`.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Replace all occurrences of clients with things
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docker-compose and nginx.conf
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename `clients service` to `things service`
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename function and veriable names
Remove other occurences of `clients` word/prefix/sufix and replace it with `things`.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix error sending id
Id field must not be sent in POST request in order to create a new thing.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Disable thing type edit
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Export location header
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docker config to use port 3000
Update docker-compose.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Replace id check with bool variable
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename dialogs
Fix bug when creating channel with no connected things.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Moved docker composition management into 'bin' directory. Removed unused
monitoring composition and fixed versions of NATS, Cassandra and NGINX.
Signed-off-by: Dejan Mijic <dejan@mainflux.com>