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

package uri

import "mellium.im/xmpp/uri"

Package uri parses XMPP URI and IRI's as defined in RFC 5122.

It also provides easy access to query components defined in XEP-0147: XMPP URI Scheme Query Components and the XMPP URI/IRI Querytypes registry.


Package Files


type URI Uses

type URI struct {

    // ToAddr is the recipient address.
    ToAddr jid.JID

    // AuthAddr is empty if we should perform an action as the currently
    // authenticated account or ask the uesr to input the account to use.
    // Otherwise it is the auth address if present in an xmpp:// URI or IRI.
    AuthAddr jid.JID

    // Action is the first query component without a value and normally determines
    // the action to take when handling the URI. For example, the query string
    // might be ?join to join a chatroom, or ?message to send a message.
    // For more information see XEP-0147: XMPP URI Scheme Query Components.
    Action string

URI is a parsed XMPP URI or IRI.

func Parse Uses

func Parse(rawuri string) (*URI, error)

Parse parses rawuri into a URI structure.

func (*URI) String Uses

func (u *URI) String() string

String reassembles the URI or IRI Into a valid IRI string.

Package uri imports 6 packages (graph). Updated 2019-11-14. Refresh now. Tools for package owners.