| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Simplex.Chat.Operators
Documentation
usageConditionsCommit :: Text Source #
previousConditionsCommit :: Text Source #
usageConditionsText :: Text Source #
data OperatorTag Source #
Instances
data UsageConditions Source #
Constructors
| UsageConditions | |
Fields
| |
Instances
| FromJSON UsageConditions Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser UsageConditions parseJSONList :: Value -> Parser [UsageConditions] omittedField :: Maybe UsageConditions | |
| ToJSON UsageConditions Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: UsageConditions -> Value toEncoding :: UsageConditions -> Encoding toJSONList :: [UsageConditions] -> Value toEncodingList :: [UsageConditions] -> Encoding omitField :: UsageConditions -> Bool | |
| Show UsageConditions Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UsageConditions -> ShowS show :: UsageConditions -> String showList :: [UsageConditions] -> ShowS | |
data UsageConditionsAction Source #
Constructors
| UCAReview | |
Fields
| |
| UCAAccepted | |
Fields
| |
Instances
| FromJSON UsageConditionsAction Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser UsageConditionsAction parseJSONList :: Value -> Parser [UsageConditionsAction] omittedField :: Maybe UsageConditionsAction | |
| ToJSON UsageConditionsAction Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: UsageConditionsAction -> Value toEncoding :: UsageConditionsAction -> Encoding toJSONList :: [UsageConditionsAction] -> Value toEncodingList :: [UsageConditionsAction] -> Encoding omitField :: UsageConditionsAction -> Bool | |
| Show UsageConditionsAction Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UsageConditionsAction -> ShowS show :: UsageConditionsAction -> String showList :: [UsageConditionsAction] -> ShowS | |
data ServerOperatorConditions Source #
Constructors
| ServerOperatorConditions | |
Fields | |
Instances
| FromJSON ServerOperatorConditions Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser ServerOperatorConditions parseJSONList :: Value -> Parser [ServerOperatorConditions] omittedField :: Maybe ServerOperatorConditions | |
| ToJSON ServerOperatorConditions Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: ServerOperatorConditions -> Value toEncoding :: ServerOperatorConditions -> Encoding toJSONList :: [ServerOperatorConditions] -> Value toEncodingList :: [ServerOperatorConditions] -> Encoding omitField :: ServerOperatorConditions -> Bool | |
| Show ServerOperatorConditions Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> ServerOperatorConditions -> ShowS show :: ServerOperatorConditions -> String showList :: [ServerOperatorConditions] -> ShowS | |
usageConditionsAction :: [ServerOperator] -> UsageConditions -> UTCTime -> Maybe UsageConditionsAction Source #
conditionsRequiredOrDeadline :: UTCTime -> UTCTime -> Maybe UTCTime Source #
data ConditionsAcceptance Source #
Constructors
| CAAccepted | |
Fields
| |
| CARequired | |
Fields
| |
Instances
| FromJSON ConditionsAcceptance Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser ConditionsAcceptance parseJSONList :: Value -> Parser [ConditionsAcceptance] omittedField :: Maybe ConditionsAcceptance | |
| ToJSON ConditionsAcceptance Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: ConditionsAcceptance -> Value toEncoding :: ConditionsAcceptance -> Encoding toJSONList :: [ConditionsAcceptance] -> Value toEncodingList :: [ConditionsAcceptance] -> Encoding omitField :: ConditionsAcceptance -> Bool | |
| Show ConditionsAcceptance Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> ConditionsAcceptance -> ShowS show :: ConditionsAcceptance -> String showList :: [ConditionsAcceptance] -> ShowS | |
type ServerOperator = ServerOperator' 'DBStored Source #
type NewServerOperator = ServerOperator' 'DBNew Source #
data AServerOperator Source #
Constructors
| forall s. ASO (SDBStored s) (ServerOperator' s) |
Instances
| Show AServerOperator Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> AServerOperator -> ShowS show :: AServerOperator -> String showList :: [AServerOperator] -> ShowS | |
data ServerOperator' s Source #
Constructors
| ServerOperator | |
Fields
| |
Instances
| DBStoredI s => FromJSON (ServerOperator' s) Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser (ServerOperator' s) parseJSONList :: Value -> Parser [ServerOperator' s] omittedField :: Maybe (ServerOperator' s) | |
| ToJSON (ServerOperator' s) Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: ServerOperator' s -> Value toEncoding :: ServerOperator' s -> Encoding toJSONList :: [ServerOperator' s] -> Value toEncodingList :: [ServerOperator' s] -> Encoding omitField :: ServerOperator' s -> Bool | |
| Show (ServerOperator' s) Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> ServerOperator' s -> ShowS show :: ServerOperator' s -> String showList :: [ServerOperator' s] -> ShowS | |
data ServerOperatorRoles Source #
Constructors
| ServerOperatorRoles | |
Fields
| |
Instances
| Show ServerOperatorRoles Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> ServerOperatorRoles -> ShowS show :: ServerOperatorRoles -> String showList :: [ServerOperatorRoles] -> ShowS | |
operatorRoles :: UserProtocol p => SProtocolType p -> ServerOperator -> ServerRoles Source #
conditionsAccepted :: ServerOperator -> Bool Source #
data UserOperatorServers Source #
Constructors
| UserOperatorServers | |
Fields
| |
Instances
data UpdatedUserOperatorServers Source #
Constructors
| UpdatedUserOperatorServers | |
Fields
| |
Instances
data ValidatedProtoServer p Source #
Constructors
| ValidatedProtoServer | |
Fields
| |
Instances
| Show (ValidatedProtoServer p) Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> ValidatedProtoServer p -> ShowS show :: ValidatedProtoServer p -> String showList :: [ValidatedProtoServer p] -> ShowS | |
class UserServersClass u where Source #
Associated Types
type AServer u = (s :: ProtocolType -> Type) | s -> u Source #
type AChatRelay u = (s :: Type) | s -> u Source #
Methods
operator' :: u -> Maybe ServerOperator Source #
aUserServer' :: AServer u p -> AUserServer p Source #
servers' :: UserProtocol p => SProtocolType p -> u -> [AServer u p] Source #
chatRelays' :: u -> [AChatRelay u] Source #
aUserChatRelay' :: AChatRelay u -> AUserChatRelay Source #
Instances
type UserServer p = UserServer' 'DBStored p Source #
type NewUserServer p = UserServer' 'DBNew p Source #
data AUserServer p Source #
Constructors
| forall s. AUS (SDBStored s) (UserServer' s p) |
Instances
| ProtocolTypeI p => FromJSON (AUserServer p) Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser (AUserServer p) parseJSONList :: Value -> Parser [AUserServer p] omittedField :: Maybe (AUserServer p) | |
| Show (AUserServer p) Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> AUserServer p -> ShowS show :: AUserServer p -> String showList :: [AUserServer p] -> ShowS | |
data UserServer' s (p :: ProtocolType) Source #
Constructors
| UserServer | |
Instances
| (DBStoredI s, ProtocolTypeI p) => FromJSON (UserServer' s p) Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser (UserServer' s p) parseJSONList :: Value -> Parser [UserServer' s p] omittedField :: Maybe (UserServer' s p) | |
| ProtocolTypeI p => ToJSON (UserServer' s p) Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: UserServer' s p -> Value toEncoding :: UserServer' s p -> Encoding toJSONList :: [UserServer' s p] -> Value toEncodingList :: [UserServer' s p] -> Encoding omitField :: UserServer' s p -> Bool | |
| Show (UserServer' s p) Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UserServer' s p -> ShowS show :: UserServer' s p -> String showList :: [UserServer' s p] -> ShowS | |
presetServerAddress :: UserServer' s p -> ProtocolServer p Source #
type UserChatRelay = UserChatRelay' 'DBStored Source #
type NewUserChatRelay = UserChatRelay' 'DBNew Source #
data AUserChatRelay Source #
Constructors
| forall s. AUCR (SDBStored s) (UserChatRelay' s) |
Instances
| FromJSON AUserChatRelay Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser AUserChatRelay parseJSONList :: Value -> Parser [AUserChatRelay] omittedField :: Maybe AUserChatRelay | |
| Show AUserChatRelay Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> AUserChatRelay -> ShowS show :: AUserChatRelay -> String showList :: [AUserChatRelay] -> ShowS | |
data UserChatRelay' s Source #
Constructors
| UserChatRelay | |
Fields
| |
Instances
| Eq UserChatRelay Source # | |
Defined in Simplex.Chat.Operators | |
| DBStoredI s => FromJSON (UserChatRelay' s) Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser (UserChatRelay' s) parseJSONList :: Value -> Parser [UserChatRelay' s] omittedField :: Maybe (UserChatRelay' s) | |
| ToJSON (UserChatRelay' s) Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: UserChatRelay' s -> Value toEncoding :: UserChatRelay' s -> Encoding toJSONList :: [UserChatRelay' s] -> Value toEncodingList :: [UserChatRelay' s] -> Encoding omitField :: UserChatRelay' s -> Bool | |
| Show (UserChatRelay' s) Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UserChatRelay' s -> ShowS show :: UserChatRelay' s -> String showList :: [UserChatRelay' s] -> ShowS | |
data GroupRelay Source #
Constructors
| GroupRelay | |
Fields
| |
Instances
| FromJSON GroupRelay Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser GroupRelay parseJSONList :: Value -> Parser [GroupRelay] omittedField :: Maybe GroupRelay | |
| ToJSON GroupRelay Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: GroupRelay -> Value toEncoding :: GroupRelay -> Encoding toJSONList :: [GroupRelay] -> Value toEncodingList :: [GroupRelay] -> Encoding omitField :: GroupRelay -> Bool | |
| Show GroupRelay Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> GroupRelay -> ShowS show :: GroupRelay -> String showList :: [GroupRelay] -> ShowS | |
| Eq GroupRelay Source # | |
Defined in Simplex.Chat.Operators | |
data CLINewRelay Source #
Constructors
| CLINewRelay | |
Fields
| |
Instances
| Show CLINewRelay Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> CLINewRelay -> ShowS show :: CLINewRelay -> String showList :: [CLINewRelay] -> ShowS | |
data PresetOperator Source #
Constructors
| PresetOperator | |
Fields
| |
Instances
| Show PresetOperator Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> PresetOperator -> ShowS show :: PresetOperator -> String showList :: [PresetOperator] -> ShowS | |
pOperator :: PresetOperator -> Maybe NewServerOperator Source #
pServers :: UserProtocol p => SProtocolType p -> PresetOperator -> [NewUserServer p] Source #
operatorServersToUse :: UserProtocol p => SProtocolType p -> PresetOperator -> Int Source #
presetServer' :: Bool -> ProtocolServer p -> NewUserServer p Source #
presetServer :: Bool -> ProtoServerWithAuth p -> NewUserServer p Source #
newUserServer :: ProtoServerWithAuth p -> NewUserServer p Source #
newUserServer_ :: Bool -> Bool -> ProtoServerWithAuth p -> NewUserServer p Source #
presetChatRelay :: Bool -> RelayProfile -> [Text] -> ShortLinkContact -> NewUserChatRelay Source #
newChatRelay :: RelayProfile -> [Text] -> ShortLinkContact -> NewUserChatRelay Source #
newChatRelay_ :: Bool -> Bool -> RelayProfile -> [Text] -> ShortLinkContact -> NewUserChatRelay Source #
usageConditionsToAdd :: Bool -> UTCTime -> [UsageConditions] -> (UsageConditions, [UsageConditions]) Source #
usageConditionsToAdd' :: Text -> Text -> Bool -> UTCTime -> [UsageConditions] -> (UsageConditions, [UsageConditions]) Source #
presetUserServers :: [(Maybe PresetOperator, Maybe ServerOperator)] -> [UpdatedUserOperatorServers] Source #
updatedServerOperators :: NonEmpty PresetOperator -> [ServerOperator] -> [(Maybe PresetOperator, Maybe AServerOperator)] Source #
updatedUserServers :: (Maybe PresetOperator, UserOperatorServers) -> UpdatedUserOperatorServers Source #
srvHost :: UserServer' s p -> NonEmpty TransportHost Source #
agentServerCfgs :: UserProtocol p => SProtocolType p -> [(Text, ServerOperator)] -> [UserServer' s p] -> [ServerCfg p] Source #
matchingHost :: Text -> TransportHost -> Bool Source #
operatorDomains :: [ServerOperator' s] -> [(Text, ServerOperator' s)] Source #
groupByOperator :: ([Maybe ServerOperator], [UserServer 'PSMP], [UserServer 'PXFTP], [UserChatRelay]) -> IO [UserOperatorServers] Source #
groupByOperator' :: ([(Maybe PresetOperator, Maybe ServerOperator)], [UserServer 'PSMP], [UserServer 'PXFTP], [UserChatRelay]) -> IO [(Maybe PresetOperator, UserOperatorServers)] Source #
groupByOperator_ :: forall f. (Box f, Traversable f) => ([f (Maybe ServerOperator)], [UserServer 'PSMP], [UserServer 'PXFTP], [UserChatRelay]) -> IO [f UserOperatorServers] Source #
data UserServersError Source #
Constructors
| USENoServers | |
| USEStorageMissing | |
| USEProxyMissing | |
| USEDuplicateServer | |
Fields
| |
| USEDuplicateChatRelayAddress | |
Fields
| |
Instances
| FromJSON UserServersError Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser UserServersError parseJSONList :: Value -> Parser [UserServersError] omittedField :: Maybe UserServersError | |
| ToJSON UserServersError Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: UserServersError -> Value toEncoding :: UserServersError -> Encoding toJSONList :: [UserServersError] -> Value toEncodingList :: [UserServersError] -> Encoding omitField :: UserServersError -> Bool | |
| Show UserServersError Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UserServersError -> ShowS show :: UserServersError -> String showList :: [UserServersError] -> ShowS | |
data UserServersWarning Source #
Constructors
| USWNoChatRelays | |
Instances
| FromJSON UserServersWarning Source # | |
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser UserServersWarning parseJSONList :: Value -> Parser [UserServersWarning] omittedField :: Maybe UserServersWarning | |
| ToJSON UserServersWarning Source # | |
Defined in Simplex.Chat.Operators Methods toJSON :: UserServersWarning -> Value toEncoding :: UserServersWarning -> Encoding toJSONList :: [UserServersWarning] -> Value toEncodingList :: [UserServersWarning] -> Encoding omitField :: UserServersWarning -> Bool | |
| Show UserServersWarning Source # | |
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UserServersWarning -> ShowS show :: UserServersWarning -> String showList :: [UserServersWarning] -> ShowS | |
validateUserServers :: UserServersClass u' => [u'] -> [(User, [UserOperatorServers])] -> ([UserServersError], [UserServersWarning]) Source #