module Airship.Config
( AirshipConfig
, HeaderInclusion (..)
, includeTraceHeader
, includeQuipHeader
, defaultAirshipConfig
) where
import Lens.Micro (Lens', lens)
data AirshipConfig = AirshipConfig
{ :: HeaderInclusion
, :: HeaderInclusion
}
data = | deriving (HeaderInclusion -> HeaderInclusion -> Bool
(HeaderInclusion -> HeaderInclusion -> Bool)
-> (HeaderInclusion -> HeaderInclusion -> Bool)
-> Eq HeaderInclusion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HeaderInclusion -> HeaderInclusion -> Bool
$c/= :: HeaderInclusion -> HeaderInclusion -> Bool
== :: HeaderInclusion -> HeaderInclusion -> Bool
$c== :: HeaderInclusion -> HeaderInclusion -> Bool
Eq, Int -> HeaderInclusion -> ShowS
[HeaderInclusion] -> ShowS
HeaderInclusion -> String
(Int -> HeaderInclusion -> ShowS)
-> (HeaderInclusion -> String)
-> ([HeaderInclusion] -> ShowS)
-> Show HeaderInclusion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HeaderInclusion] -> ShowS
$cshowList :: [HeaderInclusion] -> ShowS
show :: HeaderInclusion -> String
$cshow :: HeaderInclusion -> String
showsPrec :: Int -> HeaderInclusion -> ShowS
$cshowsPrec :: Int -> HeaderInclusion -> ShowS
Show)
includeTraceHeader :: Lens' AirshipConfig HeaderInclusion
= (AirshipConfig -> HeaderInclusion)
-> (AirshipConfig -> HeaderInclusion -> AirshipConfig)
-> Lens AirshipConfig AirshipConfig HeaderInclusion HeaderInclusion
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens AirshipConfig -> HeaderInclusion
_includeTraceHeader (\AirshipConfig
s HeaderInclusion
n -> AirshipConfig
s { _includeTraceHeader :: HeaderInclusion
_includeTraceHeader = HeaderInclusion
n })
includeQuipHeader :: Lens' AirshipConfig HeaderInclusion
= (AirshipConfig -> HeaderInclusion)
-> (AirshipConfig -> HeaderInclusion -> AirshipConfig)
-> Lens AirshipConfig AirshipConfig HeaderInclusion HeaderInclusion
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens AirshipConfig -> HeaderInclusion
_includeQuipHeader (\AirshipConfig
s HeaderInclusion
n -> AirshipConfig
s { _includeQuipHeader :: HeaderInclusion
_includeQuipHeader = HeaderInclusion
n })
defaultAirshipConfig :: AirshipConfig
defaultAirshipConfig :: AirshipConfig
defaultAirshipConfig = HeaderInclusion -> HeaderInclusion -> AirshipConfig
AirshipConfig HeaderInclusion
IncludeHeader HeaderInclusion
IncludeHeader