Module

URI.Authority

Package
purescript-uri
Repository
purescript-contrib/purescript-uri

#Authority Source

data Authority userInfo hosts

The authority part of a URI. For example: purescript.org, localhost:3000, user@example.net.

Constructors

Instances

#AuthorityOptions Source

type AuthorityOptions userInfo hosts = AuthorityParseOptions userInfo hosts (AuthorityPrintOptions userInfo hosts ())

A row type for describing the options fields used by the authority parser and printer.

Used as Record (AuthorityOptions userInfo hosts) when type annotating an options record.

#AuthorityParseOptions Source

type AuthorityParseOptions userInfo hosts r = (parseHosts :: Parser String hosts, parseUserInfo :: UserInfo -> Either URIPartParseError userInfo | r)

A row type for describing the options fields used by the authority parser.

Used as Record (AuthorityParseOptions userInfo hosts ()) when type annotating an options record.

#AuthorityPrintOptions Source

type AuthorityPrintOptions userInfo hosts r = (printHosts :: hosts -> String, printUserInfo :: userInfo -> UserInfo | r)

A row type for describing the options fields used by the authority printer.

Used as Record (AuthorityPrintOptions userInfo hosts ()) when type annotating an options record.

#parser Source

parser :: forall userInfo hosts r. Record (AuthorityParseOptions userInfo hosts r) -> Parser String (Authority userInfo hosts)

A parser for the authority part of a URI. Expects values with a "//" prefix.

#print Source

print :: forall userInfo hosts r. Record (AuthorityPrintOptions userInfo hosts r) -> Authority userInfo hosts -> String

A printer for the authority part of a URI. Will print the value with a "//" prefix.

#_userInfo Source

_userInfo :: forall userInfo hosts. Lens' (Authority userInfo hosts) (Maybe userInfo)

A lens for the user-info component of the authority.

#_hosts Source

_hosts :: forall userInfo hosts. Lens' (Authority userInfo hosts) hosts

A lens for the host(s) component of the authority.

Re-exports from URI.Host

#RegName Source

newtype RegName

The reg-name variation of the host part of a URI. A reg-name is probably more commonly referred to as just a host name or domain name (but it is actually a name, rather than an IP address).

Instances

#IPv6Address Source

newtype IPv6Address

This type and parser are much too forgiving currently, allowing almost anything through that looks vaguely IPv6ish.

Instances

#IPv4Address Source

data IPv4Address

The IPv4 address variation of the host part of a URI.

Instances

#Host Source

data Host

A host address. Supports named addresses, IPv4, and IPv6.

Constructors

Instances

#_NameAddress Source

_NameAddress :: Prism' Host RegName

A prism for the NameAddress constructor.

#_IPv6Address Source

_IPv6Address :: Prism' Host IPv6Address

A prism for the IPv6Address constructor.

#_IPv4Address Source

_IPv4Address :: Prism' Host IPv4Address

A prism for the IPv4Address constructor.

Re-exports from URI.Port

#Port Source

newtype Port

The port component of a host in a URI.

Instances

Re-exports from URI.UserInfo

#UserInfo Source

newtype UserInfo

The user info part of an Authority. For example: user, foo:bar.

This type treats the entire string as an undifferentiated blob, if you would like to specifically deal with the user:password format, take a look at URI.Extra.UserPassInfo.

Instances