Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URI

type URI struct {
	*url.URL

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

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