go-xmpp/packet.go

19 lines
438 B
Go
Raw Normal View History

2018-01-01 09:12:33 -08:00
package xmpp // import "fluux.io/xmpp"
2018-01-13 09:50:17 -08:00
type Packet interface {
Name() string
}
2018-01-13 08:54:07 -08:00
// PacketAttrs represents the common structure for base XMPP packets.
type PacketAttrs struct {
Id string `xml:"id,attr,omitempty"`
From string `xml:"from,attr,omitempty"`
To string `xml:"to,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Lang string `xml:"lang,attr,omitempty"`
}
type packetFormatter interface {
XMPPFormat() string
}