Documentation ¶
Overview ¶
Package endpointaddr implements parsing and validation of "<host>[:<port>]" strings for Pinniped APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostPort ¶
type HostPort struct { // Host is the validated host part of the input, which may be a hostname or IP. // // This string can be be used as an x509 certificate SAN. Host string // Port is the validated port number, which may be defaulted. Port uint16 }
func Parse ¶
Parse an "endpoint address" string, providing a default port. The input can be in several valid formats:
- "<hostname>" (DNS hostname) - "<IPv4>" (IPv4 address) - "<IPv6>" (IPv6 address) - "<hostname>:<port>" (DNS hostname with port) - "<IPv4>:<port>" (IPv4 address with port) - "[<IPv6>]:<port>" (IPv6 address with port, brackets are required)
If the input does not not specify a port number, then defaultPort will be used.
Click to show internal directories.
Click to hide internal directories.