Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

352 B
Raw Blame
package events

import (
	"time"

	"github.com/teris-io/shortid"
)

// Event is any kind of event.
type Event struct {
	Timestamp time.Time `json:"timestamp"`
	ID        string    `json:"id"`
}

// SetDefaults will set default properties of all inbound events.
func (e *Event) SetDefaults() {
	e.ID = shortid.MustGenerate()
	e.Timestamp = time.Now()
}