Version: v0.21.3 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0



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.



This section is empty.


This section is empty.


This section is empty.


type URI

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 user 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

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

Parse parses rawuri into a URI structure.

func (*URI) String

func (u *URI) String() string

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL