Documentation ¶
Index ¶
Constants ¶
View Source
const (
// PayloadName defines the name of the chat payload.
PayloadName = "chat"
)
Variables ¶
View Source
var Type = payload.NewType(payloadType, PayloadName)
Type represents the identifier which addresses the chat payload type.
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events struct {
MessageReceived *event.Event[*MessageReceivedEvent]
}
Events define events occurring within a Chat.
type MessageReceivedEvent ¶ added in v0.9.0
type MessageReceivedEvent struct { From string To string Message string Timestamp time.Time MessageID string }
Event defines the information passed when a chat event fires.
type Payload ¶
Payload represents the chat payload type.
func NewPayload ¶
NewPayload creates a new chat payload.
Click to show internal directories.
Click to hide internal directories.