module Data.TypeID.V5
(
TypeIDV5
, getPrefix
, getUUID
, genTypeID
, decorateTypeID
, genID
, decorate
, checkPrefix
, checkTypeID
, checkID
, toString
, toText
, toByteString
, parseString
, parseText
, parseByteString
, parseStringM
, parseTextM
, parseByteStringM
, id2String
, id2Text
, id2ByteString
, string2ID
, text2ID
, byteString2ID
, string2IDM
, text2IDM
, byteString2IDM
) where
import Control.Monad.IO.Class
import Data.ByteString.Lazy (ByteString)
import Data.Text (Text)
import Data.TypeID.Class
import Data.TypeID.Error
import qualified Data.TypeID.Internal as TID
import Data.UUID.Types (UUID)
import Data.UUID.Versions
import Data.Word
type TypeIDV5 = TID.TypeID' 'V5
genTypeID :: MonadIO m => Text -> UUID -> [Word8] -> m TypeIDV5
genTypeID :: forall (m :: * -> *).
MonadIO m =>
Text -> UUID -> [Word8] -> m TypeIDV5
genTypeID = forall (m :: * -> *).
MonadIO m =>
Text -> UUID -> [Word8] -> m TypeIDV5
TID.genTypeIDV5
{-# INLINE genTypeID #-}
decorateTypeID :: Text -> UUID -> Either TypeIDError TypeIDV5
decorateTypeID :: Text -> UUID -> Either TypeIDError TypeIDV5
decorateTypeID = forall (version :: UUIDVersion).
Text -> UUID -> Either TypeIDError (TypeID' version)
TID.decorateTypeID
{-# INLINE decorateTypeID #-}
checkPrefix :: Text -> Maybe TypeIDError
checkPrefix :: Text -> Maybe TypeIDError
checkPrefix = Text -> Maybe TypeIDError
TID.checkPrefix
{-# INLINE checkPrefix #-}
checkTypeID :: TypeIDV5 -> Maybe TypeIDError
checkTypeID :: TypeIDV5 -> Maybe TypeIDError
checkTypeID = TypeIDV5 -> Maybe TypeIDError
TID.checkTypeIDV5
{-# INLINE checkTypeID #-}
toString :: TypeIDV5 -> String
toString :: TypeIDV5 -> String
toString = forall (version :: UUIDVersion). TypeID' version -> String
TID.toString
{-# INLINE toString #-}
toText :: TypeIDV5 -> Text
toText :: TypeIDV5 -> Text
toText = forall (version :: UUIDVersion). TypeID' version -> Text
TID.toText
{-# INLINE toText #-}
toByteString :: TypeIDV5 -> ByteString
toByteString :: TypeIDV5 -> ByteString
toByteString = forall (version :: UUIDVersion). TypeID' version -> ByteString
TID.toByteString
{-# INLINE toByteString #-}
parseString :: String -> Either TypeIDError TypeIDV5
parseString :: String -> Either TypeIDError TypeIDV5
parseString = forall (version :: UUIDVersion).
String -> Either TypeIDError (TypeID' version)
TID.parseString
{-# INLINE parseString #-}
parseText :: Text -> Either TypeIDError TypeIDV5
parseText :: Text -> Either TypeIDError TypeIDV5
parseText = forall (version :: UUIDVersion).
Text -> Either TypeIDError (TypeID' version)
TID.parseText
{-# INLINE parseText #-}
parseByteString :: ByteString -> Either TypeIDError TypeIDV5
parseByteString :: ByteString -> Either TypeIDError TypeIDV5
parseByteString = forall (version :: UUIDVersion).
ByteString -> Either TypeIDError (TypeID' version)
TID.parseByteString
{-# INLINE parseByteString #-}
parseStringM :: MonadIO m => String -> m TypeIDV5
parseStringM :: forall (m :: * -> *). MonadIO m => String -> m TypeIDV5
parseStringM = forall (m :: * -> *) (version :: UUIDVersion).
MonadIO m =>
String -> m (TypeID' version)
TID.parseStringM
{-# INLINE parseStringM #-}
parseTextM :: MonadIO m => Text -> m TypeIDV5
parseTextM :: forall (m :: * -> *). MonadIO m => Text -> m TypeIDV5
parseTextM = forall (m :: * -> *) (version :: UUIDVersion).
MonadIO m =>
Text -> m (TypeID' version)
TID.parseTextM
{-# INLINE parseTextM #-}
parseByteStringM :: MonadIO m => ByteString -> m TypeIDV5
parseByteStringM :: forall (m :: * -> *). MonadIO m => ByteString -> m TypeIDV5
parseByteStringM = forall (m :: * -> *) (version :: UUIDVersion).
MonadIO m =>
ByteString -> m (TypeID' version)
TID.parseByteStringM
{-# INLINE parseByteStringM #-}