{-# LANGUAGE FlexibleContexts, OverloadedStrings, RecordWildCards #-}
module Network.AWS.CloudFront.SignedCookies.CLI
( main
) where
import Network.AWS.CloudFront.SignedCookies.CLI.Internal
import qualified Network.AWS.CloudFront.SignedCookies.CLI.Decode as Decode
import qualified Network.AWS.CloudFront.SignedCookies.CLI.Sign as Sign
import Control.Monad (join)
import Data.Semigroup ((<>))
import qualified Options.Applicative as Opt
main :: IO ()
main =
join $ Opt.execParser mainParserInfo
mainParserInfo :: Opt.ParserInfo (IO ())
mainParserInfo =
Opt.info (Opt.helper <*> mainParser) $
Opt.header "AWS CloudFront signed cookie utility"
mainParser :: Opt.Parser (IO ())
mainParser =
Opt.hsubparser $
Opt.command "decode" Decode.mainParserInfo <>
Opt.command "sign" Sign.mainParserInfo