Documentation ¶
Index ¶
- Constants
- Variables
- func EscapeLocal(s string) string
- func Parse(data string) (interface{}, error)
- func PrintTree(s string)
- func UnescapeLocal(s string) string
- type Bind
- type Conn
- func (c *Conn) Disconnect()
- func (c *Conn) JoinMUC(room, conference, nick string)
- func (c *Conn) Kick(lobby, nick, reason string) error
- func (c *Conn) Recv() (interface{}, error)
- func (c *Conn) SendComposing(jid, typeof string) error
- func (c *Conn) SendMessage(jid, typeof, body string) error
- func (c *Conn) SendPaused(jid, typeof string) error
- type Error
- type Event
- type IQ
- type JID
- type Message
- type NicknameInUse
- type Opts
- type Ping
- type Presence
- type Stanza
Constants ¶
View Source
const ( OpenStanza = "<open xmlns='urn:ietf:params:xml:ns:xmpp-framing' to='{{.Host}}' version='1.0'/>" AuthStanza = "<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'/>" BindStanza = "<iq type='set' id='_bind_auth_2' xmlns='jabber:client'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/></iq>" SessStanza = "<iq type='set' id='_session_auth_2' xmlns='jabber:client'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>" JoinMucStanza = "<presence from='{{.JID}}' to='{{.MUCJID}}' xmlns='jabber:client'><x xmlns='http://jabber.org/protocol/muc'/></presence>" JoinMucStanza2 = "<presence from='{{.JID}}' to='{{.MUCJID}}' xmlns='jabber:client'><show/><status/></presence>" SendMessageStanza = "" /* 177-byte string literal not displayed */ SendComposingStanza = "" /* 204-byte string literal not displayed */ SendPausedStanza = "" /* 198-byte string literal not displayed */ KickUserStanza = `` /* 194-byte string literal not displayed */ PingResponse = `<iq type='result' to='{{.Host}}' id='{{.Id}}' xmlns='jabber:client'/>` )
Variables ¶
View Source
var (
RateLimited = errors.New("xmpp: rate limited")
)
Functions ¶
func EscapeLocal ¶
func UnescapeLocal ¶
Types ¶
type Conn ¶
func (*Conn) Disconnect ¶
func (c *Conn) Disconnect()
func (*Conn) SendComposing ¶
func (*Conn) SendMessage ¶
func (*Conn) SendPaused ¶
type IQ ¶
type Message ¶
type Message struct { Message xml.Name Type string `xml:"type,attr"` From string `xml:"from,attr"` To string `xml:"to,attr"` Id string `xml:"id,attr"` Body string `xml:"body"` Error Error `xml:"error"` X Event `xml:"x"` }
func ParseMessage ¶
type NicknameInUse ¶
type NicknameInUse struct {
JID
}
Click to show internal directories.
Click to hide internal directories.