| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Simplex.FileTransfer.Protocol
Synopsis
- data FileParty
- data SFileParty (a :: FileParty) where
- data AFileParty = FilePartyI p => AFP (SFileParty p)
- class FilePartyI (p :: FileParty) where
- sFileParty :: SFileParty p
- data FileCommand (p :: FileParty) where
- FNEW :: FileInfo -> NonEmpty RcvPublicAuthKey -> Maybe BasicAuth -> FileCommand 'FSender
- FADD :: NonEmpty RcvPublicAuthKey -> FileCommand 'FSender
- FPUT :: FileCommand 'FSender
- FDEL :: FileCommand 'FSender
- FGET :: RcvPublicDhKey -> FileCommand 'FRecipient
- FACK :: FileCommand 'FRecipient
- PING :: FileCommand 'FRecipient
- data FileCmd = FilePartyI p => FileCmd (SFileParty p) (FileCommand p)
- data FileInfo = FileInfo {
- sndKey :: SndPublicAuthKey
- size :: Word32
- digest :: ByteString
- type XFTPFileId = EntityId
- data FileResponse
- = FRSndIds SenderId (NonEmpty RecipientId)
- | FRRcvIds (NonEmpty RecipientId)
- | FRFile RcvPublicDhKey CbNonce
- | FROk
- | FRErr XFTPErrorType
- | FRPong
- xftpBlockSize :: Int
- toFileParty :: forall (p :: FileParty). SFileParty p -> FileParty
- aFileParty :: FileParty -> AFileParty
- checkParty :: forall t (p :: FileParty) (p' :: FileParty). (FilePartyI p, FilePartyI p') => t p' -> Either String (t p)
- xftpEncodeAuthTransmission :: ProtocolEncoding XFTPVersion XFTPErrorType c => THandleParams XFTPVersion 'TClient -> APrivateAuthKey -> Transmission c -> Either TransportError ByteString
- xftpEncodeTransmission :: forall c (p :: TransportPeer). ProtocolEncoding XFTPVersion XFTPErrorType c => THandleParams XFTPVersion p -> Transmission c -> Either TransportError ByteString
- xftpDecodeTServer :: THandleParams XFTPVersion 'TServer -> ByteString -> Either XFTPErrorType (SignedTransmissionOrError XFTPErrorType FileCmd)
- xftpDecodeTClient :: THandleParams XFTPVersion 'TClient -> ByteString -> Either XFTPErrorType (Transmission (Either XFTPErrorType FileResponse))
Documentation
File protocol clients
Constructors
| FRecipient | |
| FSender |
Instances
| FromJSON FileParty Source # | |
Defined in Simplex.FileTransfer.Protocol Methods parseJSON :: Value -> Parser FileParty parseJSONList :: Value -> Parser [FileParty] omittedField :: Maybe FileParty | |
| ToJSON FileParty Source # | |
Defined in Simplex.FileTransfer.Protocol Methods toEncoding :: FileParty -> Encoding toJSONList :: [FileParty] -> Value toEncodingList :: [FileParty] -> Encoding | |
| Show FileParty Source # | |
| Eq FileParty Source # | |
| TestEquality SFileParty Source # | |
Defined in Simplex.FileTransfer.Protocol Methods testEquality :: forall (a :: FileParty) (b :: FileParty). SFileParty a -> SFileParty b -> Maybe (a :~: b) | |
data SFileParty (a :: FileParty) where Source #
Constructors
| SFRecipient :: SFileParty 'FRecipient | |
| SFSender :: SFileParty 'FSender |
Instances
| TestEquality SFileParty Source # | |
Defined in Simplex.FileTransfer.Protocol Methods testEquality :: forall (a :: FileParty) (b :: FileParty). SFileParty a -> SFileParty b -> Maybe (a :~: b) | |
| Show (SFileParty p) Source # | |
Defined in Simplex.FileTransfer.Protocol Methods showsPrec :: Int -> SFileParty p -> ShowS show :: SFileParty p -> String showList :: [SFileParty p] -> ShowS | |
| Eq (SFileParty p) Source # | |
Defined in Simplex.FileTransfer.Protocol | |
data AFileParty Source #
Constructors
| FilePartyI p => AFP (SFileParty p) |
class FilePartyI (p :: FileParty) where Source #
Methods
sFileParty :: SFileParty p Source #
Instances
| FilePartyI 'FRecipient Source # | |
Defined in Simplex.FileTransfer.Protocol Methods | |
| FilePartyI 'FSender Source # | |
Defined in Simplex.FileTransfer.Protocol Methods | |
data FileCommand (p :: FileParty) where Source #
Constructors
| FNEW :: FileInfo -> NonEmpty RcvPublicAuthKey -> Maybe BasicAuth -> FileCommand 'FSender | |
| FADD :: NonEmpty RcvPublicAuthKey -> FileCommand 'FSender | |
| FPUT :: FileCommand 'FSender | |
| FDEL :: FileCommand 'FSender | |
| FGET :: RcvPublicDhKey -> FileCommand 'FRecipient | |
| FACK :: FileCommand 'FRecipient | |
| PING :: FileCommand 'FRecipient |
Instances
| FilePartyI p => ProtocolEncoding XFTPVersion XFTPErrorType (FileCommand p) Source # | |||||
Defined in Simplex.FileTransfer.Protocol Associated Types
Methods encodeProtocol :: Version XFTPVersion -> FileCommand p -> ByteString Source # protocolP :: Version XFTPVersion -> Tag (FileCommand p) -> Parser (FileCommand p) Source # fromProtocolError :: ProtocolErrorType -> XFTPErrorType Source # checkCredentials :: Maybe TAuthorizations -> EntityId -> FileCommand p -> Either XFTPErrorType (FileCommand p) Source # | |||||
| Show (FileCommand p) Source # | |||||
Defined in Simplex.FileTransfer.Protocol Methods showsPrec :: Int -> FileCommand p -> ShowS show :: FileCommand p -> String showList :: [FileCommand p] -> ShowS | |||||
| type Tag (FileCommand p) Source # | |||||
Defined in Simplex.FileTransfer.Protocol | |||||
Constructors
| FilePartyI p => FileCmd (SFileParty p) (FileCommand p) |
Instances
| Show FileCmd Source # | |||||
| ProtocolEncoding XFTPVersion XFTPErrorType FileCmd Source # | |||||
Defined in Simplex.FileTransfer.Protocol Associated Types
Methods encodeProtocol :: Version XFTPVersion -> FileCmd -> ByteString Source # protocolP :: Version XFTPVersion -> Tag FileCmd -> Parser FileCmd Source # fromProtocolError :: ProtocolErrorType -> XFTPErrorType Source # checkCredentials :: Maybe TAuthorizations -> EntityId -> FileCmd -> Either XFTPErrorType FileCmd Source # | |||||
| type Tag FileCmd Source # | |||||
Defined in Simplex.FileTransfer.Protocol | |||||
Constructors
| FileInfo | |
Fields
| |
type XFTPFileId = EntityId Source #
data FileResponse Source #
Constructors
| FRSndIds SenderId (NonEmpty RecipientId) | |
| FRRcvIds (NonEmpty RecipientId) | |
| FRFile RcvPublicDhKey CbNonce | |
| FROk | |
| FRErr XFTPErrorType | |
| FRPong |
Instances
xftpBlockSize :: Int Source #
toFileParty :: forall (p :: FileParty). SFileParty p -> FileParty Source #
aFileParty :: FileParty -> AFileParty Source #
checkParty :: forall t (p :: FileParty) (p' :: FileParty). (FilePartyI p, FilePartyI p') => t p' -> Either String (t p) Source #
xftpEncodeAuthTransmission :: ProtocolEncoding XFTPVersion XFTPErrorType c => THandleParams XFTPVersion 'TClient -> APrivateAuthKey -> Transmission c -> Either TransportError ByteString Source #
xftpEncodeTransmission :: forall c (p :: TransportPeer). ProtocolEncoding XFTPVersion XFTPErrorType c => THandleParams XFTPVersion p -> Transmission c -> Either TransportError ByteString Source #
xftpDecodeTServer :: THandleParams XFTPVersion 'TServer -> ByteString -> Either XFTPErrorType (SignedTransmissionOrError XFTPErrorType FileCmd) Source #
xftpDecodeTClient :: THandleParams XFTPVersion 'TClient -> ByteString -> Either XFTPErrorType (Transmission (Either XFTPErrorType FileResponse)) Source #