Documentation
¶
Overview ¶
Package pageref parses the ways a caller can name a Confluence page — the URL as copied from the browser, the short link from the Share dialog, or a bare page ID — and builds page URLs from the pieces the API returns.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChildPageURL ¶
ChildPageURL builds the URL of a page sitting in the same space as the page parentWebUI links to, which every child of that page does. Child listings carry no web link of their own, so the parent's is what they are assembled from.
When parentWebUI yields no space key it falls back to the page-ID query form, which needs none: a URL built from an empty key is a 404, so the key never reaches spacePageURL unless it is real.
func HostOf ¶
HostOf returns the host of a stored page URL, or "" if it has none. It is how `update` picks a profile from the URL its sidecar recorded.
func PageURL ¶
PageURL builds a page's absolute URL from the site base and the relative web link the API returned. When the API returned no link, it falls back to the page-ID query form, which needs no space key.
func SpaceKeyOf ¶
SpaceKeyOf returns the space key embedded in the relative web link the API returns for a page, or "" when the link is empty or not in that shape. Every key the API has been observed to emit — including the ~accountid form of a personal space — is made of characters that SpacePageURL's path escaping leaves alone, so the captured segment is returned undecoded.
func SpacePageURL ¶
SpacePageURL builds a page's URL from its space key. The result is in the form Parse accepts, so a link built with it can be fed straight back to `cflio read`.