mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-23 02:52:00 -08:00
d9fdff0839
* Add constants (enumlike) for stanza types * NewIQ, NewMessage and NewPresence are now initialized with the Attrs struct * Update examples * Do not export backoff code. For now, we do not need to expose backoff in the documentation * Make presence priority an int8
19 lines
420 B
Go
19 lines
420 B
Go
package xmpp
|
|
|
|
type Packet interface {
|
|
Name() string
|
|
}
|
|
|
|
// Attrs represents the common structure for base XMPP packets.
|
|
type Attrs struct {
|
|
Type StanzaType `xml:"type,attr,omitempty"`
|
|
Id string `xml:"id,attr,omitempty"`
|
|
From string `xml:"from,attr,omitempty"`
|
|
To string `xml:"to,attr,omitempty"`
|
|
Lang string `xml:"lang,attr,omitempty"`
|
|
}
|
|
|
|
type packetFormatter interface {
|
|
XMPPFormat() string
|
|
}
|