xmpp: mellium.im/xmpp/roster Index | Files

package roster

import "mellium.im/xmpp/roster"

Package roster implements contact list functionality.

Index

Package Files

roster.go

Constants

const (
    NS = "jabber:iq:roster"
)

Namespaces used by this package provided as a convenience.

type IQ Uses

type IQ struct {
    stanza.IQ

    Query struct {
        Ver  string `xml:"version,attr,omitempty"`
        Item []Item `xml:"item"`
    }   `xml:"jabber:iq:roster query"`
}

IQ represents a user roster request or response. The zero value is a valid query for the roster.

func (IQ) MarshalXML Uses

func (iq IQ) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML satisfies the xml.Marshaler interface.

func (IQ) TokenReader Uses

func (iq IQ) TokenReader() xml.TokenReader

TokenReader satisfies the xmlstream.Marshaler interface.

func (IQ) WriteXML Uses

func (iq IQ) WriteXML(w xmlstream.TokenWriter) (n int, err error)

WriteXML satisfies the xmlstream.WriterTo interface. It is like MarshalXML except it writes tokens to w.

type Item Uses

type Item struct {
    JID          jid.JID `xml:"jid,attr,omitempty"`
    Name         string  `xml:"name,attr,omitempty"`
    Subscription string  `xml:"subscription,attr,omitempty"`
    Group        string  `xml:"group,omitempty"`
}

Item represents a contact in the roster.

func (Item) MarshalXML Uses

func (item Item) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML satisfies the xml.Marshaler interface.

func (Item) TokenReader Uses

func (item Item) TokenReader() xml.TokenReader

TokenReader satisfies the xmlstream.Marshaler interface.

func (Item) WriteXML Uses

func (item Item) WriteXML(w xmlstream.TokenWriter) (n int, err error)

WriteXML satisfies the xmlstream.WriterTo interface. It is like MarshalXML except it writes tokens to w.

Package roster imports 5 packages (graph). Updated 2018-11-14. Refresh now. Tools for package owners.