| Safe Haskell | None |
|---|---|
| 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
| 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 :: DBStored) 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 :: forall (p :: ProtocolType). 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
| FromJSON UpdatedUserOperatorServers Source # | |||||
Defined in Simplex.Chat.Operators Methods parseJSON :: Value -> Parser UpdatedUserOperatorServers parseJSONList :: Value -> Parser [UpdatedUserOperatorServers] omittedField :: Maybe UpdatedUserOperatorServers | |||||
| Show UpdatedUserOperatorServers Source # | |||||
Defined in Simplex.Chat.Operators Methods showsPrec :: Int -> UpdatedUserOperatorServers -> ShowS show :: UpdatedUserOperatorServers -> String showList :: [UpdatedUserOperatorServers] -> ShowS | |||||
| UserServersClass UpdatedUserOperatorServers Source # | |||||
Defined in Simplex.Chat.Operators Associated Types
Methods operator' :: UpdatedUserOperatorServers -> Maybe ServerOperator Source # aUserServer' :: forall (p :: ProtocolType). AServer UpdatedUserOperatorServers p -> AUserServer p Source # servers' :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> UpdatedUserOperatorServers -> [AServer UpdatedUserOperatorServers p] Source # | |||||
| type AServer UpdatedUserOperatorServers Source # | |||||
Defined in Simplex.Chat.Operators | |||||
data ValidatedProtoServer (p :: ProtocolType) 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 #
Methods
operator' :: u -> Maybe ServerOperator Source #
aUserServer' :: forall (p :: ProtocolType). AServer u p -> AUserServer p Source #
servers' :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> u -> [AServer u p] Source #
Instances
| UserServersClass UpdatedUserOperatorServers Source # | |||||
Defined in Simplex.Chat.Operators Associated Types
Methods operator' :: UpdatedUserOperatorServers -> Maybe ServerOperator Source # aUserServer' :: forall (p :: ProtocolType). AServer UpdatedUserOperatorServers p -> AUserServer p Source # servers' :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> UpdatedUserOperatorServers -> [AServer UpdatedUserOperatorServers p] Source # | |||||
| UserServersClass UserOperatorServers Source # | |||||
Defined in Simplex.Chat.Operators Associated Types
Methods operator' :: UserOperatorServers -> Maybe ServerOperator Source # aUserServer' :: forall (p :: ProtocolType). AServer UserOperatorServers p -> AUserServer p Source # servers' :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> UserOperatorServers -> [AServer UserOperatorServers p] Source # | |||||
type UserServer (p :: ProtocolType) = UserServer' 'DBStored p Source #
type NewUserServer (p :: ProtocolType) = UserServer' 'DBNew p Source #
data AUserServer (p :: ProtocolType) Source #
Constructors
| 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 :: DBStored) (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 :: forall (s :: DBStored) (p :: ProtocolType). UserServer' s p -> ProtocolServer p Source #
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 :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> PresetOperator -> [NewUserServer p] Source #
operatorServersToUse :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> PresetOperator -> Int Source #
presetServer' :: forall (p :: ProtocolType). Bool -> ProtocolServer p -> NewUserServer p Source #
presetServer :: forall (p :: ProtocolType). Bool -> ProtoServerWithAuth p -> NewUserServer p Source #
newUserServer :: forall (p :: ProtocolType). ProtoServerWithAuth p -> NewUserServer p Source #
newUserServer_ :: forall (p :: ProtocolType). Bool -> Bool -> ProtoServerWithAuth p -> NewUserServer p 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 :: forall (s :: DBStored) (p :: ProtocolType). UserServer' s p -> NonEmpty TransportHost Source #
agentServerCfgs :: forall (p :: ProtocolType) (s :: DBStored). UserProtocol p => SProtocolType p -> [(Text, ServerOperator)] -> [UserServer' s p] -> [ServerCfg p] Source #
matchingHost :: Text -> TransportHost -> Bool Source #
operatorDomains :: forall (s :: DBStored). [ServerOperator' s] -> [(Text, ServerOperator' s)] Source #
groupByOperator :: ([Maybe ServerOperator], [UserServer 'PSMP], [UserServer 'PXFTP]) -> IO [UserOperatorServers] Source #
groupByOperator' :: ([(Maybe PresetOperator, Maybe ServerOperator)], [UserServer 'PSMP], [UserServer 'PXFTP]) -> IO [(Maybe PresetOperator, UserOperatorServers)] Source #
groupByOperator_ :: (Box f, Traversable f) => ([f (Maybe ServerOperator)], [UserServer 'PSMP], [UserServer 'PXFTP]) -> IO [f UserOperatorServers] Source #
data UserServersError Source #
Constructors
| USENoServers | |
| USEStorageMissing | |
| USEProxyMissing | |
| USEDuplicateServer | |
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 | |
validateUserServers :: UserServersClass u' => [u'] -> [(User, [UserOperatorServers])] -> [UserServersError] Source #