module Hocker.Types.ImageName where
import Control.DeepSeq
import Data.Monoid
import qualified Options.Applicative as Options
import Options.Generic
newtype ImageName = ImageName { unImageName :: String }
deriving (Generic, Show)
instance ParseField ImageName where
readField = ImageName <$> Options.str
parseField _ _ _ =
ImageName <$>
(Options.argument Options.str $
( Options.metavar "IMAGE-NAME"
<> Options.help "Docker image name, e.g: 'debian' in debian:jessie"
)
)
instance ParseFields ImageName where
instance ParseRecord ImageName where
parseRecord = fmap getOnly parseRecord
instance NFData ImageName