events

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TypeChatOut string = "chat_out"
View Source
const TypeChatResumed string = "chat_resumed"
View Source
const TypeChatStarted string = "chat_started"
View Source
const TypeHistory string = "history"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatOutEvent

type ChatOutEvent struct {
	MsgOut *models.MsgOut `json:"msg_out,omitempty"`
	// contains filtered or unexported fields
}

func NewChatMsgOut

func NewChatMsgOut(MsgOut *models.MsgOut) *ChatOutEvent

func (*ChatOutEvent) Type

func (e *ChatOutEvent) Type() string

type ChatResumed

type ChatResumed struct {
	ChatID models.ChatID `json:"chat_id"`
	Email  string        `json:"email"`
	// contains filtered or unexported fields
}

func NewChatResumed

func NewChatResumed(chatID models.ChatID, email string) *ChatResumed

func (*ChatResumed) Type

func (e *ChatResumed) Type() string

type ChatStarted

type ChatStarted struct {
	ChatID models.ChatID `json:"chat_id"`
	// contains filtered or unexported fields
}

func NewChatStarted

func NewChatStarted(chatID models.ChatID) *ChatStarted

func (*ChatStarted) Type

func (e *ChatStarted) Type() string

type Event

type Event interface {
	Type() string
}

type HistoryEvent

type HistoryEvent struct {
	History []*HistoryItem `json:"history"`
	// contains filtered or unexported fields
}

func NewHistory

func NewHistory(history []*HistoryItem) *HistoryEvent

func (*HistoryEvent) Type

func (e *HistoryEvent) Type() string

type HistoryItem

type HistoryItem struct {
	MsgIn  *models.MsgIn  `json:"msg_in,omitempty"`
	MsgOut *models.MsgOut `json:"msg_out,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL