Commit Graph

41 Commits

Author SHA1 Message Date
Dušan Borovčanin 9f37927dec MF-932 - User API keys (#941)
* Add inital Auth implementation

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

* Extract IssuedAt on transport layer

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

* Add token type

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

* Fix Auth service URL in Things service

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

* Add User Keys revocation check

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

* Update tests

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

* Remove unused tracing methods

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

* Fix Key retrival and parsing

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

* Remove unused code

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

* Increase test coverage

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

* Fix compose files

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

* Fix typos

Simplify tests.

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

* Fix typos and remove useless comments

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

* Rename Auth to Authn

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

* Rename database.go to tracin.go

A new name (`tracing.go`) describes better the purpose of the file.

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

* Increase test coverage

Fix typo.

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

* Increase test coverage

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

* Remove token from Users service

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

* Fix identify login keys

Rename token parsing method.

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

* Extract tokenizer to interface

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

* Remove pointer time

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

* Use pointer for expiration time in response

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

* Use uppercase N

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

* Remove unnecessary email check

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

* Cleanup unused code and env vars

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

* Rename tokenizer field

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

* Use slices and named fields in test cases

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

* Update AuthN keys naming

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

* Remove package-lock.json changes

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

* Remove Secret from issuing request

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-12-16 16:22:09 +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
Nick Neisen 894e1b83ec MF-898 - Add bulk connections endpoint (#948)
* Change connect endpoint to use bulk connections

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Add documentation for bulk connect

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Update service and postgres for multiple channels

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Update bulk connect endpoint

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Fix missed test

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Improve test code coverage

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change methods to use shared data type

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Fix provisioning example

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change depreciation messages to specify v1.0.0

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Switch singluar log to plural

Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-11-15 18:44:31 +01:00
Nick Neisen 67d518821a MF-898 - Change thing's service to use bulk connect (#946)
* Change thing's service to use bulk connect

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Move owner check outside of loop

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change invalid user to unauthorized access error

Signed-off-by: Nick Neisen <nwneisen@gmail.com>
2019-11-12 01:24:29 +01:00
Nick Neisen 1a31ecd044 MF-906 - Change single creation endpoints to use bulk service calls (#927)
* Change single endpoints to use bulk creation

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Remove single creation from thing's service

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Remove single save from thing's postgres

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change BulkSave to Save

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change service calls to use variadic parameters

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change postgres things to use variadic functions

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add depreciation warnings

Signed-off-by: Nick Neisen <nwneisen@gmail.com>
2019-11-04 21:14:17 +01:00
Nick Neisen 426813cec4 Change channels to chs (#918)
Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-10-29 19:06:48 +01:00
Nick Neisen 8f3dff837b MF-484 - Add bulk provisioning for things and channels (#889)
* Add provisioning to postgres

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add provisioning to things and channels service

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add JSON provisioning endpoint to things API

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add provisioning to SDK and CLI

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Update docs

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Remove response location and adjust channelsFromFile

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change naming from 'provison' to 'bulkCreate'

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add gocsv to vendors folder

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Update "bulk" naming

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Move CSV to CLI and remove gocsv dependancy

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Update docs and responses

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change AddThings to be CreateThings

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Improve test coverage

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Fixes after review

Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-10-29 12:59:54 +01:00
Manuel Imperiale fec058c614
NOISSUE - Fix Redis envars (#903)
* NOISSUE - Fix Redis envars

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

* Fix url

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

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-10-28 09:49:34 +01: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
Nick Neisen 6687a738ce MF-785 - Change CanAccess to CanAccessByKey (#894)
* Change CanAccess to CanAccessByKey for things

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change CanAccess in remaining occurances

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Regenerate generated files

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Generate pb.go files with protoc 3.6.1

Signed-off-by: Nick Neisen <nwneisen@gmail.com>
2019-10-21 23:24:45 +02:00
Nick Neisen 66487eda42 MF-788 - Remove date and minimize copyright comments (#876)
* Update copyright comment for go files

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Update copyright in assortment of file types

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Remove missed copyright date

Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-10-07 16:14:47 +02:00
Mirko Teodorovic ecc15b64b6 MF-859 - Channels metadata search (#867)
* add users metadata

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

* add users metadata

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

* add metadata to users

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

* add metadata to users

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

* run.sh

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

* add metadata to users

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

* add default value for metadata

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

* add default value for metadata

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

* when metadata is not set dont save 'null' string

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

* when metadata is not set dont save 'null' string

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

* add metadata to channels

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

* add metadata to channels

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

* change metadata type, add error handling

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

* add pause

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

* remove extra char

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

* retype from string to []byte

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

* add metadata to channels

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

* add metadata to channels

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

* add wait logic for gnatsd

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

* few small fixes

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

* fix identityRes

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

* add metadata to channels

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

* add metadata to channels

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

* add metadata to channels

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

* fix waiting for gnatsd

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

* fix waiting for gnatsd

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

* fix waiting for gnatsd

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

* changes to wait gnatsd logic

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

* changes to wait gnatsd logic

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

* testing query

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

* fix query

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

* fix query

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

* fix merge problem

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

* Update requests.go

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

* Delete pwdrecovery.go

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

* fix merge problem

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

* fix merge problem

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

* small change in comments

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

* remove unused struct

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

* fix comments

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2019-10-01 14:12:52 +02:00
Mirko Teodorovic d20dfa84bc NOISSUE - Search by metadata (#849)
* add metadata search

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

* add metadata search

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

* add metadata search

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

* add metadata search

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

* add metadata search

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

* add metadata search

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

* add metadata search

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

* add space

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

* metadata test case

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

* add docs and update swagger

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

* add test for metadata

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

* add test for metadata

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

* remove commented out section

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

* small change to test

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

* remove debug printf

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

* small fix for metadata

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

* fix tests

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

* and => and/or

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

* add line

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

* fix mixed func params

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

* metadata will be added to channels later

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

* fix return type

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

* fix typings

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

* fix typings

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

* add migration

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

* remove var

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

* respecting the order of migrations

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2019-09-17 15:46:24 +02:00
Dušan Borovčanin e17a3de1d0 NOISSUE - Use Thing ID to update certs data (#827)
* Use ThingID to update certs

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

* Fix logging typo

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

* Update API tests and service mock

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-09-03 13:54:56 +02:00
Dušan Borovčanin e7891ec6ab Add encryption key to env vars table (#823)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-08-15 16:26:31 +02:00
Dušan Borovčanin f03949a003 NOISSUE - Support encrypted bootstrap (#796)
* Fix API docs

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

* Provide secured bootstrapping

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

* Fix test and mock methods signatures

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

* Fix tests

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

* Fix typos

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

* Add encrypte bootstrap test

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 duplicated docs

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

* Use secret key to encrypt bootstrap request

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

* Use secret key for secure bootstrapping

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

* Move encryption to ConfigReader

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

* Remove ConfigReader from Service

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

* Fix tests

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

* Add reader tests

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

* Update API docs

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

* Unset key env variable

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

* Add endpoint test for secure bootstrap

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-08-02 14:35:31 +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
Ivan Milošević 1ad14e7fd3 fix mainflux_id parameter in bootstrap swagger (#789)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2019-07-16 16:21:37 +02:00
Aleksandar Novaković a6a8648e4f MF-783 - Allow access checking by a thing ID (#784)
* Add can access by things ID endpoint to things service

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

* Add new auth endpoint to the swagger docs

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

* Add test for the new endpoint of the things service

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-07-15 18:28:15 +02:00
Aleksandar Novaković 4ab2e396c2 NOISSUE - Add authorization HTTP API to things service (#772)
* Add authorization HTTP API to things service

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

* Add new tests and update existing ones

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

* Update swagger documentation

Update swagger documentation for auth endpoints.

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

* Update README docs for things service

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

* Update docker-compose and fix endpoint typo

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

* Remove commented code

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-07-04 17:06:55 +02:00
Dušan Borovčanin f27cb1d019 Update docs (#766)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-06-21 14:07:24 +02:00
Manuel Imperiale 63de955a7c
NOISSUE - Add searchable Channels name (#754)
* NOISSUE - Add searchable Things name

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>

* Add postgres schema validation and tests

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

* Add namme tests in requests_test

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

* NOISSUE - Add searchable Channels name

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

* Fix test description

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

* Fix bootstrap mocks

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

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-06-11 10:37:25 +02:00
Manuel Imperiale c8979ac297
NOISSUE - Add searchable Things name (#750)
* NOISSUE - Add searchable Things name

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>

* Add postgres schema validation and tests

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

* Add namme tests in requests_test

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

* Typo fix

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

* Rm requests_test

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

* Add name in ListThings loggins

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

* Add invalidName var for tests

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

* Set maxNameSize to 1024

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

* Fix postgres test

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

* Fix total when filtering things by name

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

* Fix review

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-05-30 15:33:49 +02:00
Dušan Borovčanin cac1e35b58 NOISSUE - Add certificate fields to the Bootstrap service (#752)
* Add cert fields to the BS

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

* Add cert fields when creating a config

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

* Add update cert endpoint

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

* Fix key column name

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

* Add cert fields to db converters

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

* Secure cert update endpoint

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

* Authroize cert update methods

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

* Fix Bootstrap service tests

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

* Add cert update service tests

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

* Update endpoit tests

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

* Update API docs

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

* Update request tests

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

* Fix request tests

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

* Update repository tests

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

* Fix typo in repo tests

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-05-22 23:22:19 +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ć dc9333237f MF-707 - Allow custom Thing key (#726)
* Add support for setting up thing key manually

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

* Fix existing tests and add new ones

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

* Update SQL schema for things entity

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

* Add update thing key endpoint to swagger docs

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

* Fix response code when handling conflicting key

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2019-04-25 14:37:51 +02:00
Manuel Imperiale b97deb50b2 MF-488 - Remove Thing type (app or device) (#718)
* MF-488 - Remove Thing type (app or device)

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

* Typo fix

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>
2019-04-20 14:09:11 +02:00
Dušan Borovčanin 44615c5ff0 Remove empty channels check (#720)
Remove empty list of channels check from the default Bootstrap
reader implementation.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-04-18 18:02:20 +02:00
Dušan Borovčanin d9d9da49a8 MF-715 - Conflict on updating connection with a valid list of channels (#716)
* Add check if Channels already exist

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

* Update streams tests to use time offset

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-04-17 19:41:37 +02:00
Dušan Borovčanin fe9f4dca8e NOISSUE - Update event fields naming (#713)
* Update event fields naming

Replace `id` with `thing_id`.
Fix typo in `success` field.

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

* Update docs

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-04-16 18:32:05 +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
Dušan Borovčanin 0bbc4f54ab Fix Bootstrap service event map keys (#705)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-04-11 13:55:21 +02:00
Dušan Borovčanin 6ebc758f89 MF-687 - Add event sourcing to Bootstrap service (#695)
* Add initial Bootstrap event producer

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

* Add operation name to events

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

* Add ES path for BS events

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

* Add BS event sourcing tests

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

* Add connections update events

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

* Extract event XADD to separeate method

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

* Add header comments

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

* Fix service docs typo

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

* Update BS service README.md

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

* Update Service method tests

Tests for handler methods are not added.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-04-08 08:46:07 -07:00
tony-ward 7c4c6109f4 MF-639 Split Content-Type header field on semicolon and evaluate all substrings (#644)
* Split Content-Type header field on semicolon and evaluate all substrings

Signed-off-by: Tony Ward <tony@lucidtron.com>

* included strings library
Signed-off-by: Tony Ward <tony0ward@hotmail.com>

* simplify code, run gofmt

Signed-off-by: tony <tony0ward@hotmail.com>
Signed-off-by: tony <tony@lucidtron.com>

* allow Content-Type to only contain the required type

Signed-off-by: Tony Ward <tony@lucidtron.com>
2019-03-19 12:00:11 +01:00
Aleksandar Novaković 8c3bff5f4b MF-656 - Change bootstrap service port to 8200 (#658)
* Change bootstrap service port to 8200

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

* Fix redis streams tests in things service

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2019-03-18 13:50:44 +01:00
Dušan Borovčanin 2ed1471d5f MF-539 - Improve Bootstrap Service documentation (#646)
* Fix infinte loop in Subscribe method

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

* Update API docs

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

* Update service README

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

* Update docs

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

* Add bootstrapping flow gif

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

* Update bootstrapping flow gif

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-03-15 19:11:26 +01:00
Dušan Borovčanin 3300814026
MF-552 - Use event sourcing to keep Bootstrap service in sync with Things service (#603)
* Use separate table for Channels

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

* Add inital event sourcing subscription

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

* Add Channel update sync

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

* Add Thing remove sync

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

* Add Channel remove sync

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

* Update service add method marshalling metadata

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

* Make separate methods for connection update

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

* Add diconnect event sync

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

* Update Configs repository mock

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

* Fix service tests

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

* Update repository tests

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

* Update API docs

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

* Update Location header

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

* Update README.md

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

* Fix tests mutex lock

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

* Fix method names in logs

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2019-03-04 17:41:38 +01:00
Dušan Borovčanin fa7d638453 MF-540 - Add pagination in API responses for Bootstrap service (#575)
* Add Page to List response

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

* Add request validation tests

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

* Update endpoint routes

Update API docs accordingly.

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

* Add optional Thing ID to config add request

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

* Extract literals to constants

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

* Update comments

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

* Fix count logs

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2019-02-22 14:54:09 +01:00
Dušan Borovčanin 1df4dcd7b7 NOISSUE - Add name field for Bootstrap Config (#564)
* Add name field to Config

Enable search by name.

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

* Create separate response for unknown Configs

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

* Use meaningful names for filters

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

* Add name search tests

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

* Update API docs

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

* Break mocks check into multiple lines

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

* Create new instances in a consistent way

Reformat `return` statements.

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2019-02-06 10:28:54 +01:00
Dušan Borovčanin bf9e148120 MF-551 - Add metadata fields to Bootstrap Channels (#563)
* Save MF channel name and metadata to the BS

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

* Remove separate Channels table

Use nested JSON field instead.

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

* Fix tests

Use proper JSON format for Bootstrap response fields.

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

* Update API docs

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

* Remove unnecessary comments

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

* Extract Config fields to constants

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

* Inline if statements

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2019-01-30 16:40:37 +01:00
Dušan Borovčanin 22fc26b375 MF-513 - Add Bootstrapping service (#524)
* Introduce Config response for bootstrap procedure

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

* Add inital service implementation

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

* Enable status change

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

* Fix logger import

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

* Update BSS to send config in valid format

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

* Use ConfigReader to create valid format response

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

* Update config retrieval error handle

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

* Enable Thing deletion API

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

* Add API support for fetching Thing by ID

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

* Add list Things endpoint

Update database schema

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

* Use MF API to update status

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

* Use Channels list

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

* Fix reading Thing from the database

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

* Create Mainflux Thing when adding new Thing to BS

Create MF Thing as soon as Bootstrap service thing is added. There are 2
main reasons to create Thing when adding a new BS Thing over creating
Thing on bootstrapping:
1) On bootstrapping time, user JWT will not be sent as a part of
request, so there is no mechanism to send a valid API call to Mainflux.
2) This way, Bootstrap service will be in sync with Mainlux: each Thing
existing in BS will also be in Mainflux.

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

* Add Thing update

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

* Remove API key from BS service

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

* Improve channels update algorithm

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

* Refactor code

Remove unused fields, comment code and simplfy some method signatures.

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

* Remove Identity Provider and use gRPC

Update dependencies

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

* Add external auth key

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

* Update BS config reader

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

* Update docker-compose

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

* Update env variable read

Add MQTT password to bootstrap response.

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

* Update response fields and tags

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

* Remove status check

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

* Enable BS of active Things

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

* Add NewThing state

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

* Rename Status to State

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

* Update README.md

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

* Add filterng

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

* Update List endpoint

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

* Fix Database query

Remove copyright headers.

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

* Add filter type

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

* Gateway provisioning (1.d)

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

* Update self-bootstrapping feature

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

* Add mocks

Update dependencies to the newest Mainflux version.

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

* Add thing service tests

Mocks fix.
Some of the service code intentionally left untested due to possible
changes in future.
Fix copyright headers and update Mainflux and other dependencies.

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

* Use name "Config" instead of "Thing"

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

* Refactor code

Remove commented code.
Fix typo.
Remove unused exported error.

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

* Simplify service tests

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

* Remove Assign method

Raise test coverage.

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

* Update database schema

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

* Store unknown bootstrap attempts

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

* Update unknown bootstrap handling

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

* Update naming

Fix uses of `Thing` in DB and `api` package.

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

* Add endpoint tests

Currently, only test for adding a new Config are implemented.

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

* Add initialization of DB tests

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

* Add DB tests

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

* Update readme file

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

* Add API docs

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

* Remove Mainflux from vendor

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

* Add licence headers

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

* Fix service and endpoint tests

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

* Raise test coverage

Remove unused repsonse type.

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

* Update build and deployment

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

* Update API docs

Fix typo.

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

* Update imports formatting

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

* Make state response empty

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

* Raise test coverage

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

* Update API docs

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

* Update readme file

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

* Use uuid as a primary key

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

* Use Mainflux ID

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

* Remove `Created` state.

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

* Move State to separate file

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

* Add Things prefix

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

* Update API and API docs

Be consistent in API naming and add some useful comments.

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

* Refactor repository implementation

Cleanup code, make it more readable. Fix missing drop in migrations.

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

* Use "cfg" insted of "thing"

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

* Fix tests

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

* Update tables names

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2019-01-09 15:42:23 +01:00