Documentation ¶
Overview ¶
Package bookmarks implements storing bookmarks to chat rooms.
Index ¶
- Constants
- Variables
- func Delete(ctx context.Context, s *xmpp.Session, b jid.JID) error
- func DeleteIQ(ctx context.Context, s *xmpp.Session, iq stanza.IQ, b jid.JID) error
- func Publish(ctx context.Context, s *xmpp.Session, b Channel) error
- func PublishIQ(ctx context.Context, s *xmpp.Session, iq stanza.IQ, b Channel) error
- type Channel
- type Handler
- type Iter
Constants ¶
const ( NS = "urn:xmpp:bookmarks:1" NSNotify = "urn:xmpp:bookmarks:1+notify" NSCompat = "urn:xmpp:bookmarks:1#compat" )
Namespaces used by this package.
Variables ¶
A list of service discovery features that are supported by this package.
Functions ¶
func DeleteIQ ¶
DeleteIQ is like Delete except that it allows modifying the IQ. Changes to the IQ type will have no effect.
Types ¶
type Channel ¶
type Channel struct { JID jid.JID Autojoin bool Name string Nick string Password string Extensions []byte }
Channel represents a single chat room with various properties.
func (Channel) MarshalXML ¶
MarshalXML implements xml.Marshaler.
func (Channel) TokenReader ¶
func (c Channel) TokenReader() xml.TokenReader
TokenReader satisfies the xmlstream.Marshaler interface.
func (*Channel) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler.
type Handler ¶
type Handler struct { }
Handler can be registered against a mux to handle bookmark pushes.
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
Iter is an iterator over bookmarks.
func Fetch ¶
Fetch requests all bookmarks from the server and returns an iterator over the results (blocking until the response is received and the iterator is fully consumed or closed).
func FetchIQ ¶
FetchIQ is like Fetch but it allows you to customize the IQ. Changing the type of the provided IQ has no effect.
func (*Iter) Close ¶
Close indicates that we are finished with the given iterator and processing the stream may continue. Calling it multiple times has no effect.