Skip to content

Commit

Permalink
sse event
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj committed Aug 18, 2023
1 parent e3a2be9 commit 4d34cb8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/add-sse-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add sse event

Adds an event to issue sse notifications

https://github.com/cs3org/reva/pull/4119
19 changes: 19 additions & 0 deletions pkg/events/sse.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package events

import (
"encoding/json"
)

// SendSEE instructs the sse service to send a notification to a user
type SendSSE struct {
UserID string
Type string
Message []byte
}

// Unmarshal to fulfill umarshaller interface
func (SendSSE) Unmarshal(v []byte) (interface{}, error) {
e := SendSSE{}
err := json.Unmarshal(v, &e)
return e, err
}

0 comments on commit 4d34cb8

Please sign in to comment.