Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusOffline = "offline" StatusAway = "away" StatusActive = "active" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
func NewChatMessage ¶
func NewChatMessage(contents []Content) ChatMessage
NewChatMessage generates a new ChatMessage with the given Content array.
func NewHTMLChatMessage ¶
func NewHTMLChatMessage(html string) ChatMessage
NewHTMLChatMessage generates a new ChatMessage with a html text.
func NewMimeChatMessage ¶
func NewMimeChatMessage(mimetype string, data string) ChatMessage
NewMimeChatMessage generates a new ChatMessage with the given mimetype.
func NewPlainChatMessage ¶
func NewPlainChatMessage(text string) ChatMessage
NewPlainChatMessage generates a new ChatMessage with a plain text.
func (*ChatMessage) At ¶
func (m *ChatMessage) At(i int) (Content, error)
At returns the content at position i in the message.
func (*ChatMessage) First ¶
func (m *ChatMessage) First(mimetype string) (string, error)
First returns the first content that has the given mimetype.
func (*ChatMessage) HTML ¶
func (m *ChatMessage) HTML() string
HTML returns the first text/html content.
func (*ChatMessage) Push ¶
func (m *ChatMessage) Push(c Content)
Push adds a new content to the message.
func (*ChatMessage) Text ¶
func (m *ChatMessage) Text() string
Text returns the first text/plain content.
type MessageAck ¶
type MessageAck struct { }
type Roster ¶
type Roster struct {
// contains filtered or unexported fields
}
Roster represents a contact list.
type UserAvatar ¶
type UserPresence ¶
type UserPresence struct { Status UserStatus `msgpack:"status"` Ack bool `msgpack:"ack"` }
type UserProfile ¶
type UserProfile struct { Nickname string `msgpack:"nickname"` Avatar UserAvatar `msgpack:"avatar"` Extension map[string]string `msgpack:"ext"` }
type UserProfileRequest ¶
type UserProfileRequest struct { }
type UserProfileResponse ¶
type UserProfileResponse struct {
Profile UserProfile `msgpack:"profile"`
}
type UserStatus ¶
Click to show internal directories.
Click to hide internal directories.