Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatCreatedEvent ¶
type ChatCreatedEvent struct {
*ChatEvent
}
ChatCreatedEvent ...
func NewChatCreatedEvent ¶
func NewChatCreatedEvent(chatname string, t time.Time) *ChatCreatedEvent
NewChatCreatedEvent ...
func (*ChatCreatedEvent) String ¶
func (ce *ChatCreatedEvent) String() string
type ChatJoinEvent ¶
type ChatJoinEvent struct { *UserEvent models.UserStatus }
ChatJoinEvent used to emit when user joins chat (ie to db.Chat)
func NewChatJoinEvent ¶
func NewChatJoinEvent(username string, chatname string, time time.Time) *ChatJoinEvent
NewChatJoinEvent ...
func (*ChatJoinEvent) String ¶
func (ce *ChatJoinEvent) String() string
func (*ChatJoinEvent) WithStatus ¶
func (ce *ChatJoinEvent) WithStatus(status models.UserStatus) *ChatJoinEvent
WithStatus ...
type ChatLeaveEvent ¶
type ChatLeaveEvent struct {
*UserEvent
}
ChatLeaveEvent used to emit when user leaves chat (ie from db.Chat)
func NewChatLeaveEvent ¶
func NewChatLeaveEvent(username string, chatname string, time time.Time) *ChatLeaveEvent
NewChatLeaveEvent ...
func (*ChatLeaveEvent) String ¶
func (ce *ChatLeaveEvent) String() string
type ChatRemovedEvent ¶
type ChatRemovedEvent struct {
*ChatEvent
}
ChatRemovedEvent ...
func NewChatRemovedEvent ¶
func NewChatRemovedEvent(chatname string, t time.Time) *ChatRemovedEvent
NewChatRemovedEvent ...
func (*ChatRemovedEvent) String ¶
func (ce *ChatRemovedEvent) String() string
type Event ¶
type Event interface { fmt.Stringer // should return chat this event occured in // if it's global, should return "", er.ErrGlobalEvent InChat() (string, error) }
Event ...
type EventWithType ¶
EventWithType represents event with reflected Type Very convinient to json marshalling for example
func NewEventWithType ¶
func NewEventWithType(e Event) EventWithType
NewEventWithType constructs EventWithType from Event
type LoginEvent ¶
type LoginEvent struct {
*UserEvent
}
LoginEvent used to emit when user logins chat globally (ie to db.LoggedDB)
func NewLoginEvent ¶
func NewLoginEvent(username string, chatname string, time time.Time) *LoginEvent
NewLoginEvent ...
func (*LoginEvent) String ¶
func (le *LoginEvent) String() string
type LogoutEvent ¶
type LogoutEvent struct {
*UserEvent
}
LogoutEvent used to emit when user logouts globally (ie from db.LoggedDB)
func NewLogoutEvent ¶
func NewLogoutEvent(username string, chatname string, time time.Time) *LogoutEvent
NewLogoutEvent ...
func (*LogoutEvent) String ¶
func (le *LogoutEvent) String() string
type MessageEvent ¶
MessageEvent ...
func (*MessageEvent) String ¶
func (e *MessageEvent) String() string
type SystemMessageChatJoinEvent ¶
type SystemMessageChatJoinEvent struct {
*SystemMessageEvent
}
SystemMessageChatJoinEvent ...
func NewSystemMessageChatJoinEvent ¶
func NewSystemMessageChatJoinEvent(chatname, username string, t models.UnixTime) *SystemMessageChatJoinEvent
NewSystemMessageChatJoinEvent ...
func (*SystemMessageChatJoinEvent) String ¶
func (e *SystemMessageChatJoinEvent) String() string
type SystemMessageChatLeaveEvent ¶
type SystemMessageChatLeaveEvent struct {
*SystemMessageEvent
}
SystemMessageChatLeaveEvent ...
func NewSystemMessageChatLeaveEvent ¶
func NewSystemMessageChatLeaveEvent(chatname, username string, t models.UnixTime) *SystemMessageChatLeaveEvent
NewSystemMessageChatLeaveEvent ...
func (*SystemMessageChatLeaveEvent) String ¶
func (e *SystemMessageChatLeaveEvent) String() string
type SystemMessageEvent ¶
SystemMessageEvent ...
func (*SystemMessageEvent) String ¶
func (e *SystemMessageEvent) String() string