| Copyright | (c) 2022 Tim Emiola |
|---|---|
| License | BSD3 |
| Maintainer | Tim Emiola <adetokunbo@emio.la> |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Test.KeyedVals.Types
Contents
Description
This module provides types that demonstrate how to use KeyVals.Handle.Typed
The declared types are used in hspec tests used to validate implementations of Handle
data types
A simple type to illustrate storing key-values at varying storage paths.
it's just a simple type (Either) wrapped in newtype to avoid orphan instances.
Instances
| FromJSON VarDemo Source # | |
| ToJSON VarDemo Source # | |
Defined in Test.KeyedVals.Types | |
| Show VarDemo Source # | |
| Eq VarDemo Source # | |
| DecodeKV VarDemo Source # | |
| EncodeKV VarDemo Source # | |
Defined in Test.KeyedVals.Types | |
| PathOf VarDemo Source # | Describe how |
| VaryingPathOf VarDemo Source # | Specify how to derive the path to store This instance uses |
| type KVPath VarDemo Source # | |
Defined in Test.KeyedVals.Types | |
| type KeyType VarDemo Source # | |
Defined in Test.KeyedVals.Types | |
| type PathVar VarDemo Source # | |
Defined in Test.KeyedVals.Types | |
data VarDemoKey Source #
The keys for each VarDemo are Ints.
Instances
Instances
| IsString VarDemoID Source # | |
Defined in Test.KeyedVals.Types Methods fromString :: String -> VarDemoID # | |
| Show VarDemoID Source # | |
| Eq VarDemoID Source # | |
| FromHttpApiData VarDemoID Source # | |
Defined in Test.KeyedVals.Types Methods parseUrlPiece :: Text -> Either Text VarDemoID # parseHeader :: ByteString -> Either Text VarDemoID # | |
| ToHttpApiData VarDemoID Source # | |
Defined in Test.KeyedVals.Types Methods toUrlPiece :: VarDemoID -> Text # toEncodedUrlPiece :: VarDemoID -> Builder # toHeader :: VarDemoID -> ByteString # toQueryParam :: VarDemoID -> Text # | |
| DecodeKV VarDemoID Source # | |
| EncodeKV VarDemoID Source # | |
Defined in Test.KeyedVals.Types | |
A simple type to illustrate storing key-values at a fixed storage path
it's just a simple type (tuple) wrapped in newtype to avoid orphan instances.
Instances
| FromJSON FixedDemo Source # | |
| ToJSON FixedDemo Source # | |
Defined in Test.KeyedVals.Types | |
| Show FixedDemo Source # | |
| Eq FixedDemo Source # | |
| DecodeKV FixedDemo Source # | |
| EncodeKV FixedDemo Source # | |
Defined in Test.KeyedVals.Types | |
| PathOf FixedDemo Source # | Specify how |
| type KVPath FixedDemo Source # | |
Defined in Test.KeyedVals.Types | |
| type KeyType FixedDemo Source # | |
Defined in Test.KeyedVals.Types | |
data FixedDemoKey Source #
The keys for each FixedDemo are Ints.