Documentation
¶
Overview ¶
Package hosts normalizes YouTrack service URLs.
A host is identified by its key: the service URL without scheme or trailing slash, e.g. "acme.youtrack.cloud" or "tools.acme.com/youtrack" for a Server install under a path prefix. The key names config entries and keyring items.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
// URL is the canonical service URL, e.g. https://tools.acme.com/youtrack.
URL string
// Key is URL without the scheme, e.g. tools.acme.com/youtrack.
Key string
}
Host is a normalized YouTrack service location.
func Parse ¶
Parse normalizes user input such as "acme.youtrack.cloud", "https://acme.youtrack.cloud/", or "https://tools.acme.com/youtrack/api". Input without a scheme gets https.
func (Host) APIURL ¶
APIURL returns the REST API root, e.g. https://acme.youtrack.cloud/api.
func (Host) IsLoopback ¶
IsLoopback reports whether the host is localhost or a loopback address.