Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- mkClientIdentity :: (MakesValue u, MakesValue c) => u -> c -> App ClientIdentity
- cid2Str :: ClientIdentity -> String
- data MessagePackage = MessagePackage {}
- toRandomFile :: ByteString -> App FilePath
- randomFileName :: App FilePath
- mlscli :: HasCallStack => Maybe ConvId -> Ciphersuite -> ClientIdentity -> [String] -> Maybe ByteString -> App ByteString
- runCli :: HasCallStack => FilePath -> [String] -> Maybe ByteString -> App ByteString
- argSubst :: String -> String -> String -> String
- createWireClient :: (MakesValue u, HasCallStack) => u -> AddClient -> App ClientIdentity
- data InitMLSClient = InitMLSClient {}
- createMLSClient :: (MakesValue u, HasCallStack) => Ciphersuite -> InitMLSClient -> u -> App ClientIdentity
- createMLSClientWithCiphersuites :: (MakesValue u, HasCallStack) => [Ciphersuite] -> InitMLSClient -> u -> App ClientIdentity
- uploadNewKeyPackage :: HasCallStack => Ciphersuite -> ClientIdentity -> App String
- generateKeyPackage :: HasCallStack => ClientIdentity -> Ciphersuite -> App (ByteString, String)
- createNewGroup :: HasCallStack => Ciphersuite -> ClientIdentity -> App ConvId
- createSelfGroup :: HasCallStack => Ciphersuite -> ClientIdentity -> App (String, Value)
- createGroup :: Ciphersuite -> ClientIdentity -> ConvId -> App ()
- createSubConv :: HasCallStack => Ciphersuite -> ConvId -> ClientIdentity -> String -> App ()
- createOne2OneSubConv :: (HasCallStack, MakesValue keys) => Ciphersuite -> ConvId -> ClientIdentity -> String -> keys -> App ()
- resetOne2OneGroup :: (HasCallStack, MakesValue one2OneConv) => Ciphersuite -> ClientIdentity -> one2OneConv -> App ()
- resetOne2OneGroupGeneric :: (HasCallStack, MakesValue conv, MakesValue keys) => Ciphersuite -> ClientIdentity -> conv -> keys -> App ()
- resetClientGroup :: (HasCallStack, MakesValue keys) => Ciphersuite -> ClientIdentity -> String -> ConvId -> keys -> App ()
- keyPackageFile :: HasCallStack => ClientIdentity -> String -> App FilePath
- unbundleKeyPackages :: HasCallStack => Value -> App [(ClientIdentity, ByteString)]
- createAddCommit :: HasCallStack => ClientIdentity -> ConvId -> [Value] -> App MessagePackage
- withTempKeyPackageFile :: ByteString -> ContT a App FilePath
- createAddCommitWithKeyPackages :: HasCallStack => ClientIdentity -> ConvId -> [(ClientIdentity, ByteString)] -> App MessagePackage
- createRemoveCommit :: HasCallStack => ClientIdentity -> ConvId -> [ClientIdentity] -> App MessagePackage
- createAddProposals :: HasCallStack => ConvId -> ClientIdentity -> [Value] -> App [MessagePackage]
- createReInitProposal :: HasCallStack => ConvId -> ClientIdentity -> App MessagePackage
- createAddProposalWithKeyPackage :: ConvId -> ClientIdentity -> (ClientIdentity, ByteString) -> App MessagePackage
- createPendingProposalCommit :: HasCallStack => ConvId -> ClientIdentity -> App MessagePackage
- createExternalCommit :: HasCallStack => ConvId -> ClientIdentity -> Maybe ByteString -> App MessagePackage
- data MLSNotificationTag
- consumingMessages :: HasCallStack => MLSProtocol -> MessagePackage -> Codensity App ()
- consumeMessageWithPredicate :: HasCallStack => (Value -> App Bool) -> ConvId -> Ciphersuite -> ClientIdentity -> Maybe MessagePackage -> WebSocket -> App Value
- consumeMessage :: HasCallStack => ConvId -> Ciphersuite -> ClientIdentity -> Maybe MessagePackage -> WebSocket -> App Value
- consumeMessageNoExternal :: HasCallStack => Ciphersuite -> ClientIdentity -> MessagePackage -> WebSocket -> App Value
- mlsCliConsume :: HasCallStack => ConvId -> Ciphersuite -> ClientIdentity -> ByteString -> App ByteString
- sendAndConsumeMessage :: HasCallStack => MessagePackage -> App Value
- sendAndConsumeCommitBundle :: HasCallStack => MessagePackage -> App Value
- sendAndConsumeCommitBundleWithProtocol :: HasCallStack => MLSProtocol -> MessagePackage -> App Value
- consumeWelcome :: HasCallStack => ClientIdentity -> MessagePackage -> WebSocket -> App ()
- fromWelcome :: ConvId -> Ciphersuite -> ClientIdentity -> ByteString -> App ()
- readWelcome :: FilePath -> IO (Maybe ByteString)
- mkBundle :: MessagePackage -> ByteString
- mkGroupInfoMessage :: ByteString -> ByteString
- spawn :: HasCallStack => CreateProcess -> Maybe ByteString -> App ByteString
- getClientGroupState :: HasCallStack => ClientIdentity -> App ClientGroupState
- setClientGroupState :: HasCallStack => ClientIdentity -> ClientGroupState -> App ()
- showMessage :: HasCallStack => Ciphersuite -> ClientIdentity -> ByteString -> App Value
- readGroupState :: HasCallStack => ByteString -> App [(ClientIdentity, Word32)]
- createApplicationMessage :: HasCallStack => ConvId -> ClientIdentity -> String -> App MessagePackage
- leaveConv :: HasCallStack => ConvId -> ClientIdentity -> App ()
- getConv :: HasCallStack => ConvId -> ClientIdentity -> App Value
- getSubConvId :: (MakesValue user, HasCallStack) => user -> ConvId -> String -> App ConvId
Documentation
mkClientIdentity :: (MakesValue u, MakesValue c) => u -> c -> App ClientIdentity Source #
cid2Str :: ClientIdentity -> String Source #
data MessagePackage Source #
toRandomFile :: ByteString -> App FilePath Source #
mlscli :: HasCallStack => Maybe ConvId -> Ciphersuite -> ClientIdentity -> [String] -> Maybe ByteString -> App ByteString Source #
runCli :: HasCallStack => FilePath -> [String] -> Maybe ByteString -> App ByteString Source #
createWireClient :: (MakesValue u, HasCallStack) => u -> AddClient -> App ClientIdentity Source #
data InitMLSClient Source #
Instances
Default InitMLSClient Source # | |
Defined in MLS.Util def :: InitMLSClient Source # |
createMLSClient :: (MakesValue u, HasCallStack) => Ciphersuite -> InitMLSClient -> u -> App ClientIdentity Source #
Create new mls client and register with backend.
createMLSClientWithCiphersuites :: (MakesValue u, HasCallStack) => [Ciphersuite] -> InitMLSClient -> u -> App ClientIdentity Source #
Create new mls client and register with backend.
uploadNewKeyPackage :: HasCallStack => Ciphersuite -> ClientIdentity -> App String Source #
create and upload to backend
generateKeyPackage :: HasCallStack => ClientIdentity -> Ciphersuite -> App (ByteString, String) Source #
createNewGroup :: HasCallStack => Ciphersuite -> ClientIdentity -> App ConvId Source #
Create conversation and corresponding group.
createSelfGroup :: HasCallStack => Ciphersuite -> ClientIdentity -> App (String, Value) Source #
Retrieve self conversation and create the corresponding group.
createGroup :: Ciphersuite -> ClientIdentity -> ConvId -> App () Source #
createSubConv :: HasCallStack => Ciphersuite -> ConvId -> ClientIdentity -> String -> App () Source #
createOne2OneSubConv :: (HasCallStack, MakesValue keys) => Ciphersuite -> ConvId -> ClientIdentity -> String -> keys -> App () Source #
resetOne2OneGroup :: (HasCallStack, MakesValue one2OneConv) => Ciphersuite -> ClientIdentity -> one2OneConv -> App () Source #
resetOne2OneGroupGeneric :: (HasCallStack, MakesValue conv, MakesValue keys) => Ciphersuite -> ClientIdentity -> conv -> keys -> App () Source #
Useful when keys are to be taken from main conv and the conv here is the subconv
resetClientGroup :: (HasCallStack, MakesValue keys) => Ciphersuite -> ClientIdentity -> String -> ConvId -> keys -> App () Source #
keyPackageFile :: HasCallStack => ClientIdentity -> String -> App FilePath Source #
unbundleKeyPackages :: HasCallStack => Value -> App [(ClientIdentity, ByteString)] Source #
createAddCommit :: HasCallStack => ClientIdentity -> ConvId -> [Value] -> App MessagePackage Source #
Claim keypackages and create a commit/welcome pair on a given client. Note that this alters the state of the group immediately. If we want to test a scenario where the commit is rejected by the backend, we can restore the group to the previous state by using an older version of the group file.
withTempKeyPackageFile :: ByteString -> ContT a App FilePath Source #
createAddCommitWithKeyPackages :: HasCallStack => ClientIdentity -> ConvId -> [(ClientIdentity, ByteString)] -> App MessagePackage Source #
createRemoveCommit :: HasCallStack => ClientIdentity -> ConvId -> [ClientIdentity] -> App MessagePackage Source #
createAddProposals :: HasCallStack => ConvId -> ClientIdentity -> [Value] -> App [MessagePackage] Source #
createReInitProposal :: HasCallStack => ConvId -> ClientIdentity -> App MessagePackage Source #
createAddProposalWithKeyPackage :: ConvId -> ClientIdentity -> (ClientIdentity, ByteString) -> App MessagePackage Source #
createPendingProposalCommit :: HasCallStack => ConvId -> ClientIdentity -> App MessagePackage Source #
createExternalCommit :: HasCallStack => ConvId -> ClientIdentity -> Maybe ByteString -> App MessagePackage Source #
data MLSNotificationTag Source #
Instances
Show MLSNotificationTag Source # | |
Defined in MLS.Util showsPrec :: Int -> MLSNotificationTag -> ShowS # show :: MLSNotificationTag -> String # showList :: [MLSNotificationTag] -> ShowS # | |
Eq MLSNotificationTag Source # | |
Defined in MLS.Util (==) :: MLSNotificationTag -> MLSNotificationTag -> Bool # (/=) :: MLSNotificationTag -> MLSNotificationTag -> Bool # | |
Ord MLSNotificationTag Source # | |
Defined in MLS.Util compare :: MLSNotificationTag -> MLSNotificationTag -> Ordering # (<) :: MLSNotificationTag -> MLSNotificationTag -> Bool # (<=) :: MLSNotificationTag -> MLSNotificationTag -> Bool # (>) :: MLSNotificationTag -> MLSNotificationTag -> Bool # (>=) :: MLSNotificationTag -> MLSNotificationTag -> Bool # max :: MLSNotificationTag -> MLSNotificationTag -> MLSNotificationTag # min :: MLSNotificationTag -> MLSNotificationTag -> MLSNotificationTag # |
consumingMessages :: HasCallStack => MLSProtocol -> MessagePackage -> Codensity App () Source #
consumeMessageWithPredicate :: HasCallStack => (Value -> App Bool) -> ConvId -> Ciphersuite -> ClientIdentity -> Maybe MessagePackage -> WebSocket -> App Value Source #
consumeMessage :: HasCallStack => ConvId -> Ciphersuite -> ClientIdentity -> Maybe MessagePackage -> WebSocket -> App Value Source #
Get a single MLS message from a websocket and consume it. Return a JSON representation of the message.
consumeMessageNoExternal :: HasCallStack => Ciphersuite -> ClientIdentity -> MessagePackage -> WebSocket -> App Value Source #
like consumeMessage
but will not consume a message where the sender is the backend
mlsCliConsume :: HasCallStack => ConvId -> Ciphersuite -> ClientIdentity -> ByteString -> App ByteString Source #
sendAndConsumeMessage :: HasCallStack => MessagePackage -> App Value Source #
Send an MLS message, wait for clients to receive it, then consume it on
the client side. If the message is a commit, the
sendAndConsumeCommitBundle
function should be used instead.
returns response body of postMLSMessage
sendAndConsumeCommitBundleWithProtocol :: HasCallStack => MLSProtocol -> MessagePackage -> App Value Source #
Send an MLS commit bundle, wait for clients to receive it, consume it, and update the test state accordingly.
consumeWelcome :: HasCallStack => ClientIdentity -> MessagePackage -> WebSocket -> App () Source #
fromWelcome :: ConvId -> Ciphersuite -> ClientIdentity -> ByteString -> App () Source #
readWelcome :: FilePath -> IO (Maybe ByteString) Source #
mkBundle :: MessagePackage -> ByteString Source #
spawn :: HasCallStack => CreateProcess -> Maybe ByteString -> App ByteString Source #
setClientGroupState :: HasCallStack => ClientIdentity -> ClientGroupState -> App () Source #
showMessage :: HasCallStack => Ciphersuite -> ClientIdentity -> ByteString -> App Value Source #
readGroupState :: HasCallStack => ByteString -> App [(ClientIdentity, Word32)] Source #
createApplicationMessage :: HasCallStack => ConvId -> ClientIdentity -> String -> App MessagePackage Source #
leaveConv :: HasCallStack => ConvId -> ClientIdentity -> App () Source #
getConv :: HasCallStack => ConvId -> ClientIdentity -> App Value Source #
getSubConvId :: (MakesValue user, HasCallStack) => user -> ConvId -> String -> App ConvId Source #