casa-types-0.0.3: Types for Casa

Safe Haskell | None
Language | Haskell2010

Casa.Types

Description

Types and functions for use with Casa (Content-Addressable Storage Archive). See https://casa.stackage.org/.

Synopsis

- newtype BlobKey = BlobKey {
  - unBlobKey :: ByteString
  }
- blobKeyHexParser :: Text -> Either String BlobKey
- blobKeyBinaryParser :: Parser BlobKey
- blobKeyToBuilder :: BlobKey -> Builder

# Documentation

newtype BlobKey Source #

A SHA256 key to address blobs.

Constructors

BlobKey |

Fields

- unBlobKey :: ByteString

#### Instances

Instances details

FromJSON BlobKey Source # |
Instance details Defined in Casa.Types Methods parseJSON :: Value -> Parser BlobKey Source # parseJSONList :: Value -> Parser [BlobKey] Source # omittedField :: Maybe BlobKey Source #
ToJSON BlobKey Source # |
Instance details Defined in Casa.Types Methods toJSON :: BlobKey -> Value Source # toEncoding :: BlobKey -> Encoding Source # toJSONList :: [BlobKey] -> Value Source # toEncodingList :: [BlobKey] -> Encoding Source # omitField :: BlobKey -> Bool Source #
Read BlobKey Source # |
Instance details Defined in Casa.Types Methods readsPrec :: Int -> ReadS BlobKey Source # readList :: ReadS [BlobKey] Source # readPrec :: ReadPrec BlobKey Source # readListPrec :: ReadPrec [BlobKey] Source #
Show BlobKey Source # |
Instance details Defined in Casa.Types Methods showsPrec :: Int -> BlobKey -> ShowS Source # show :: BlobKey -> String Source # showList :: [BlobKey] -> ShowS Source #
Eq BlobKey Source # |
Instance details Defined in Casa.Types Methods (==) :: BlobKey -> BlobKey -> Bool Source # (/=) :: BlobKey -> BlobKey -> Bool Source #
Ord BlobKey Source # |
Instance details Defined in Casa.Types Methods compare :: BlobKey -> BlobKey -> Ordering Source # (<) :: BlobKey -> BlobKey -> Bool Source # (<=) :: BlobKey -> BlobKey -> Bool Source # (>) :: BlobKey -> BlobKey -> Bool Source # (>=) :: BlobKey -> BlobKey -> Bool Source # max :: BlobKey -> BlobKey -> BlobKey Source # min :: BlobKey -> BlobKey -> BlobKey Source #
Hashable BlobKey Source # |
Instance details Defined in Casa.Types Methods hashWithSalt :: Int -> BlobKey -> Int Source # hash :: BlobKey -> Int Source #
PathPiece BlobKey Source # |
Instance details Defined in Casa.Types Methods fromPathPiece :: Text -> Maybe BlobKey Source # toPathPiece :: BlobKey -> Text Source #
PersistField BlobKey Source # |
Instance details Defined in Casa.Types Methods toPersistValue :: BlobKey -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text BlobKey Source #
PersistFieldSql BlobKey Source # |
Instance details Defined in Casa.Types Methods sqlType :: Proxy BlobKey -> SqlType Source #

blobKeyHexParser :: Text -> Either String BlobKey Source #

Parse a blob key in hex format.

blobKeyBinaryParser :: Parser BlobKey Source #

Parse a blob key in binary format.

blobKeyToBuilder :: BlobKey -> Builder Source #

Yield a `Builder` value corresponding to the given `BlobKey` value.