Documentation ¶
Index ¶
Constants ¶
View Source
const (
EventTypeMessage = "message" // 消息事件
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelMessageEvent ¶
type ChannelMessageEvent struct { MessageEvent ChannelID string `json:"channel_id"` // Channel ID UserID string `json:"user_id"` // Sender Node ID }
type Event ¶
type Event struct { Time string `json:"time"` // RFC3339Nano format TimeISO string `json:"time_iso"` // RFC3339 format Type string `json:"type"` // message or other ob12 type DetailType string `json:"detail_type"` // p2p or channel Hash string `json:"hash,omitempty"` // optional hash }
基础事件类型
type MessageEvent ¶
type P2PMessageEvent ¶
type P2PMessageEvent struct { MessageEvent UserID string `json:"user_id"` // Sender Node ID, empty in send }
func MakeP2PMessageEvent ¶
func MakeP2PMessageEvent(message Message) P2PMessageEvent
MakeP2PMessageEvent do not assiocate with anyone, it should just be sent and handled by receiver
type TextSegment ¶
type TextSegment struct {
Text string `json:"text"`
}
Click to show internal directories.
Click to hide internal directories.