Mainflux.mainflux/bootstrap/redis/consumer/events.go

21 lines
354 B
Go
Raw Normal View History

// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package consumer
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-05 00:41:38 +08:00
type removeEvent struct {
id string
}
type updateChannelEvent struct {
id string
name string
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 20:58:56 +08:00
metadata map[string]interface{}
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-05 00:41:38 +08:00
}
// Connection event is either connect or disconnect event.
type disconnectEvent struct {
thingID string
channelID string
}