From 46705d401f6f3a679aba41e6fc4a623272f19a63 Mon Sep 17 00:00:00 2001 From: b1ackd0t <28790446+rodneyosodo@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:31:38 +0300 Subject: [PATCH] Sync events with docs (#1900) Signed-off-by: Rodney Osodo Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> --- bootstrap/events/producer/events.go | 1 + bootstrap/events/producer/streams.go | 2 +- internal/groups/events/events.go | 3 ++- things/events/events.go | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap/events/producer/events.go b/bootstrap/events/producer/events.go index cde86895..b9a61170 100644 --- a/bootstrap/events/producer/events.go +++ b/bootstrap/events/producer/events.go @@ -17,6 +17,7 @@ const ( configCreate = configPrefix + "create" configUpdate = configPrefix + "update" configRemove = configPrefix + "remove" + configView = configPrefix + "view" configList = configPrefix + "list" configHandlerRemove = configPrefix + "remove_handler" diff --git a/bootstrap/events/producer/streams.go b/bootstrap/events/producer/streams.go index 4d707e21..461ebd3e 100644 --- a/bootstrap/events/producer/streams.go +++ b/bootstrap/events/producer/streams.go @@ -57,7 +57,7 @@ func (es *eventStore) View(ctx context.Context, token, id string) (bootstrap.Con return cfg, err } ev := configEvent{ - cfg, configList, + cfg, configView, } if err := es.Publish(ctx, ev); err != nil { diff --git a/internal/groups/events/events.go b/internal/groups/events/events.go index d509a820..723724cd 100644 --- a/internal/groups/events/events.go +++ b/internal/groups/events/events.go @@ -18,7 +18,7 @@ const ( groupRemove = groupPrefix + "remove" groupView = groupPrefix + "view" groupList = groupPrefix + "list" - groupListMemberships = groupPrefix + "list_by_group" + groupListMemberships = groupPrefix + "list_by_user" ) var ( @@ -220,6 +220,7 @@ type listGroupMembershipEvent struct { func (lgme listGroupMembershipEvent) Encode() (map[string]interface{}, error) { val := map[string]interface{}{ + "operation": groupListMemberships, "group_id": lgme.groupID, "permission": lgme.permission, "member_kind": lgme.memberKind, diff --git a/things/events/events.go b/things/events/events.go index 5077ba49..79523f69 100644 --- a/things/events/events.go +++ b/things/events/events.go @@ -20,7 +20,7 @@ const ( clientRemove = clientPrefix + "remove" clientView = clientPrefix + "view" clientList = clientPrefix + "list" - clientListByGroup = clientPrefix + "list_by_group" + clientListByGroup = clientPrefix + "list_by_channel" clientIdentify = clientPrefix + "identify" clientAuthorize = clientPrefix + "authorize" )