Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- withMockServer :: HasCallStack => MockServerSettings -> (Chan e -> LiftedApplication) -> ((Host, Port) -> Chan e -> App a) -> App a
- lhMockAppWithPrekeys :: LhApiVersion -> CreateMock App -> Chan (Request, ByteString) -> LiftedApplication
- lhMockApp :: Chan (Request, ByteString) -> LiftedApplication
- lhMockAppV :: LhApiVersion -> Chan (Request, ByteString) -> LiftedApplication
- lhMockNoCommonVersion :: Chan () -> LiftedApplication
- mkLegalHoldSettings :: (String, Port) -> Value
- data CreateMock f = MkCreateMock {
- nextLastPrey :: f Value
- somePrekeys :: f [Value]
- type LiftedApplication = Request -> (Response -> App ResponseReceived) -> App ResponseReceived
- data MockServerSettings = MkMockServerSettings {
- certificate :: String
- privateKey :: String
- publicKey :: String
- data LhApiVersion
Documentation
:: HasCallStack | |
=> MockServerSettings | the mock server settings |
-> (Chan e -> LiftedApplication) | The certificate and key pair |
-> ((Host, Port) -> Chan e -> App a) | the test |
-> App a |
The channel exists to facilitate out of http comms between the test and the service. Could be used for recording (request, response) pairs.
lhMockAppWithPrekeys :: LhApiVersion -> CreateMock App -> Chan (Request, ByteString) -> LiftedApplication Source #
LegalHold service. Just fake the API, do not maintain any internal state.
lhMockApp :: Chan (Request, ByteString) -> LiftedApplication Source #
lhMockAppV :: LhApiVersion -> Chan (Request, ByteString) -> LiftedApplication Source #
lhMockNoCommonVersion :: Chan () -> LiftedApplication Source #
data CreateMock f Source #
MkCreateMock | |
|
Instances
App ~ f => Default (CreateMock f) Source # | |
Defined in Testlib.MockIntegrationService def :: CreateMock f Source # |
type LiftedApplication = Request -> (Response -> App ResponseReceived) -> App ResponseReceived Source #
data MockServerSettings Source #
MkMockServerSettings | |
|
Instances
data LhApiVersion Source #
Instances
Generic LhApiVersion Source # | |
Defined in Testlib.MockIntegrationService type Rep LhApiVersion :: Type -> Type # from :: LhApiVersion -> Rep LhApiVersion x # to :: Rep LhApiVersion x -> LhApiVersion # | |
Show LhApiVersion Source # | |
Defined in Testlib.MockIntegrationService showsPrec :: Int -> LhApiVersion -> ShowS # show :: LhApiVersion -> String # showList :: [LhApiVersion] -> ShowS # | |
type Rep LhApiVersion Source # | |