Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateRoom(name string) error
- func (c *Client) DiscoItems(to string) error
- func (c *Client) MucPresence(room string) error
- func (c *Client) Receiver(ctx context.Context)
- func (c *Client) RegisterHandler(plugin string, f func(interface{}))
- func (c *Client) Roster() error
- func (c *Client) Send(i interface{}) error
- func (c *Client) SendPresenceMuc(to string) error
- type ClientIQ
- type Cookie
- type IQ
- type IQError
- type Message
- type Minions
- type MucUser
- type Options
- type Presence
- type Query
- type QueryDiscoItems
- type QueryRoster
- type RosterItem
- type Stream
Constants ¶
View Source
const ( PLAIN = "PLAIN" BINARY_SALS = "\x00" XML_STREAM = "http://etherx.jabber.org/streams" XML_CLIENT = "jabber:client" XML_TLS = "urn:ietf:params:xml:ns:xmpp-tls" VERSION = "1.0" XMPP_DEFAULT_PORT = ":5222" STREAM = "stream" )
View Source
const ( JABBER_IQ_ROSTER = "jabber:iq:roster" JABBER_IQ_DOCKER = "jabber:iq:docker" DISCO_ITEMS = "http://jabber.org/protocol/disco#items" MUC_ONLINE = "muc_online" MUC_OFFLINE = "muc_offline" PRESENCE_HANDLER = "PRESENCE" MESSAGE_HANDLER = "MESSAGE" IQ_HANDLER = "IQ" )
View Source
const (
FORM_CREATE_ROOM = "" /* 1825-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { sync.RWMutex Jid string User string // contains filtered or unexported fields }
func (*Client) CreateRoom ¶
func (*Client) DiscoItems ¶
XEP-0030: Service Discovery
func (*Client) MucPresence ¶
func (*Client) RegisterHandler ¶
func (*Client) SendPresenceMuc ¶
type Message ¶
type Message struct { XMLName xml.Name `xml:"message"` XMLNSGA string `xml:"xmlns:ga,attr,omitempty"` To string `xml:"to,attr,omitempty"` From string `xml:"from,attr,omitempty"` Type string `xml:"type,attr,omitempty"` ID string `xml:"id,attr,omitempty"` Subject string `xml:"subject,omitempty"` Body string `xml:"body,omitempty"` }
type Presence ¶
type Presence struct { XMLName xml.Name `xml:"jabber:client presence"` From string `xml:"from,attr,omitempty"` ID string `xml:"id,attr,omitempty"` To string `xml:"to,attr,omitempty"` Type string `xml:"type,attr,omitempty"` // error, probe, subscribe, subscribed, unavailable, unsubscribe, unsubscribed Lang string `xml:"lang,attr,omitempty"` Show string `xml:"show,omitempty"` // away, chat, dnd, xa Status string `xml:"status,omitempty"` // sb []clientText Priority string `xml:"priority,attr,omitempty"` Error *clientError User MucUser }
type QueryDiscoItems ¶
type QueryDiscoItems struct { XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items query"` Item []RosterItem `xml:"item"` }
type QueryRoster ¶
type QueryRoster struct { XMLName xml.Name `xml:"jabber:iq:roster query"` Item []RosterItem `xml:"item"` }
type RosterItem ¶
type Stream ¶
type Stream struct { XMLName xml.Name `xml:"stream:stream"` XMLNS string `xml:"xmlns,attr,omitempty"` XMLNSStream string `xml:"xmlns:stream,attr,omitempty"` Language string `xml:"xml:lang,attr,omitempty"` To string `xml:"to,attr,omitempty"` From string `xml:"from,attr,omitempty"` ID string `xml:"id,attr,omitempty"` Version string `xml:"version,attr,omitempty"` }
Click to show internal directories.
Click to hide internal directories.