Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Pythia.Services.GlobalIp.Types
Description
Provides types to be used for querying the global IP addresses.
Since: 0.1
Synopsis
- type GlobalIpv4Config = GlobalIpConfig [UrlSource Ipv4]
- type GlobalIpv6Config = GlobalIpConfig [UrlSource Ipv6]
- type GlobalIpBothConfig = GlobalIpConfig ([UrlSource Ipv4], [UrlSource Ipv6])
- data GlobalIpConfig a = MkGlobalIpConfig {
- app :: GlobalIpApp
- sources :: a
- data GlobalIpApp
- newtype UrlSource a = MkUrlSource {
- unUrlSource :: Text
- _GlobalIpAppDig :: Prism' GlobalIpApp ()
- _GlobalIpAppCurl :: Prism' GlobalIpApp ()
Configuration
type GlobalIpv4Config = GlobalIpConfig [UrlSource Ipv4] Source #
Type alias for Ipv4
GlobalIpConfig
.
Since: 0.1.0.0
type GlobalIpv6Config = GlobalIpConfig [UrlSource Ipv6] Source #
Type alias for Ipv6
GlobalIpConfig
.
Since: 0.1.0.0
type GlobalIpBothConfig = GlobalIpConfig ([UrlSource Ipv4], [UrlSource Ipv6]) Source #
Type alias for Ipv4
and Ipv6
GlobalIpConfig
.
Since: 0.1.0.0
data GlobalIpConfig a Source #
Complete configuration for querying global IP addresses.
Since: 0.1
Constructors
MkGlobalIpConfig | |
Instances
data GlobalIpApp Source #
This type determines what program we use to lookup the ip address.
Since: 0.1
Constructors
GlobalIpAppCurl | Uses curl to lookup the ip addresses. Since: 0.1 |
GlobalIpAppDig | Uses the dig command to perform a DNS lookup. This is generally the fastest and most reliable. Since: 0.1 |
Instances
Extra URL sources
Additional URL source for retrieving IP information. The intended app should not be included (i.e. curl or dig), but any desired flags should be.
Examples
(dig): "resolver1.opendns.com myip.opendns.com"
(dig): -4 TXT o-o.myaddr.l.google.com
ns1.google.com
(curl): "http://whatismyip.akamai.com/"
...
Since: 0.1
Constructors
MkUrlSource | |
Fields
|
Instances
(k ~ An_Iso, a ~ Text, b ~ Text) => LabelOptic "unUrlSource" k (UrlSource p) (UrlSource p) a b Source # | Since: 0.1 |
Defined in Pythia.Services.GlobalIp.Types | |
IsString (UrlSource a) Source # | Since: 0.1 |
Defined in Pythia.Services.GlobalIp.Types Methods fromString :: String -> UrlSource a # | |
Generic (UrlSource a) Source # | |
Show (UrlSource a) Source # | Since: 0.1 |
NFData (UrlSource a) Source # | Since: 0.1 |
Defined in Pythia.Services.GlobalIp.Types | |
Eq (UrlSource a) Source # | Since: 0.1 |
Ord (UrlSource a) Source # | Since: 0.1 |
Defined in Pythia.Services.GlobalIp.Types | |
type Rep (UrlSource a) Source # | Since: 0.1 |
Defined in Pythia.Services.GlobalIp.Types |
Optics
_GlobalIpAppDig :: Prism' GlobalIpApp () Source #
Since: 0.1
_GlobalIpAppCurl :: Prism' GlobalIpApp () Source #
Since: 0.1