nidus-sync/platform/event.go
Eli Ribble e8d865d0ab
Wire up events for creating new public reports
This involved moving a lot of stuff to the platform layer since I don't
want event interfaces leaking out.

Also this includes a fix to the user authentication which I had
previously broken by making a platform-layer user object independent of
the database layer.
2026-03-13 17:56:24 +00:00

27 lines
532 B
Go

package platform
import (
"time"
"github.com/Gleipnir-Technology/nidus-sync/platform/event"
)
type Envelope = event.Envelope
type Event = event.Event
const EventTypeHeartbeat = event.EventTypeHeartbeat
func SetEventChannel(chan_events chan<- Envelope) {
event.SetEventChannel(chan_events)
}
func SudoEvent(org_id int32, content string) {
go event.Send(event.Envelope{
Event: Event{
Resource: "sudo",
Time: time.Now(),
Type: event.EventTypeSudo,
URI: content,
},
OrganizationID: org_id,
})
}