go-xmpp/stream.go

28 lines
704 B
Go
Raw Normal View History

2018-01-01 17:12:33 +00:00
package xmpp // import "fluux.io/xmpp"
import "encoding/xml"
2018-01-13 16:54:07 +00:00
// XMPP PacketAttrs Parsing
type streamFeatures struct {
XMLName xml.Name `xml:"http://etherx.jabber.org/streams features"`
StartTLS tlsStartTLS
Caps Caps
Mechanisms saslMechanisms
Bind bindBind
Session sessionSession
Any []xml.Name `xml:",any"`
}
2018-01-11 22:00:59 +00:00
type StreamError struct {
XMLName xml.Name `xml:"http://etherx.jabber.org/streams error"`
Error xml.Name `xml:",any"`
}
type Caps struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/caps c"`
Hash string `xml:"hash,attr"`
Node string `xml:"node,attr"`
Ver string `xml:"ver,attr"`
Ext string `xml:"ext,attr,omitempty"`
}