Documentation ¶
Overview ¶
Package bookmarks implements private XML based bookmarks.
This package implements an old versin of the bookmarks spec that contains serious race conditions that may result in the loss of some bookmarks. As such it should only be used for adding backwards compatibility with legacy clients and servers that do not use the same storage backend for bookmarks using different specs. If you are implementing a client from scratch, or have the option of updating, you should use the mellium.im/xmpp/bookmarks package instead.
Index ¶
Constants ¶
const NS = `storage:bookmarks`
NS is the namespace used by this package.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Delete removes the provided bookmark if it exists. If the bookmark does not exist, no error is returned.
func Set ¶
Set adds or updates a bookmark. Due to the nature of the legacy boomkarks spec, Set must first fetch the bookmarks then re-upload the entire list, making it very inefficient. There is also greater potential for race conditions if multiple cilents try to upload different bookmark lists at once.
Types ¶
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
Iter is an iterator over bookmarks.
func Fetch ¶
Fetch returns an iterator over the list of bookmarks. The session may block until the iterator is 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.