Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class HasApiRoot m where
- class DedupSubscriptions m where
- recentlySubscribed :: Address -> m Bool
- class HasAllowedOrigins t where
- allowedOrigins :: Lens' t [URIAuth]
- class HasClientSessionKey k where
- clientSessionKey :: Lens' k Key
- data NewsletterTimeouts = NewsletterTimeouts {}
- class HasNewsletterTimeouts c where
- type NewsletterAPI = NewsletterUnsub :<|> (NewsletterSub :<|> NewsletterSubConfirm)
- newsletterApi :: Proxy NewsletterAPI
- class HasNlTemplates c m | c -> m where
- nlTemplates :: Lens' c (NlTemplates m)
- confirmConfirmed :: HasApiRoot m => Getter c (Address -> m Html)
- confirmStart :: HasApiRoot m => Getter c (Address -> m Html)
- optInEmail :: HasApiRoot m => Getter c (Address -> m (Address -> Mail))
- subStartPage :: HasApiRoot m => Getter c (Text -> Text -> Text -> Text -> m Html)
- subStartSubmitted :: HasApiRoot m => Getter c (Address -> m Html)
- unsubConfirmTempl :: HasApiRoot m => Getter c (Address -> m Html)
- unsubTempl :: HasApiRoot m => Getter c (Address -> m Html)
- data NlTemplates m = NlTemplates {
- _subStartPage :: HasApiRoot m => Text -> Text -> Text -> Text -> m Html
- _subStartSubmitted :: HasApiRoot m => Address -> m Html
- _optInEmail :: HasApiRoot m => Address -> m (Address -> Mail)
- _confirmStart :: HasApiRoot m => Address -> m Html
- _confirmConfirmed :: HasApiRoot m => Address -> m Html
- _unsubConfirmTempl :: HasApiRoot m => Address -> m Html
- _unsubTempl :: HasApiRoot m => Address -> m Html
- defTemplates :: (HasClientSessionKey k, HasApiRoot m, MonadReader k m, MonadIO m, IsElem NewsletterSubConfirmGet (ApiRoot m)) => NlTemplates m
- serveNewsletter :: (HasClientSessionKey r, HasApiRoot m, HasNlTemplates r m, IsElem NewsletterUnsubGet (ApiRoot m), MonadReader r m, MonadError ServantErr m, Newsletter m, DedupSubscriptions m, HasNewsletterTimeouts r, HasAllowedOrigins r, MonadIO m) => ServerT NewsletterAPI m
- module Network.Mail.Newsletter.Web.Dedup.InMem
Documentation
class HasApiRoot m where Source #
class DedupSubscriptions m where Source #
A class to avoid repeated emailing someone even if they sign up multiple times.
recentlySubscribed :: Address -> m Bool Source #
class HasAllowedOrigins t where Source #
allowedOrigins :: Lens' t [URIAuth] Source #
class HasClientSessionKey k where Source #
clientSessionKey :: Lens' k Key Source #
Instances
HasClientSessionKey Key Source # | |
Defined in Network.Mail.Newsletter.Web.API |
data NewsletterTimeouts Source #
NewsletterTimeouts | |
|
Instances
Show NewsletterTimeouts Source # | |
Defined in Network.Mail.Newsletter.Web.API showsPrec :: Int -> NewsletterTimeouts -> ShowS # show :: NewsletterTimeouts -> String # showList :: [NewsletterTimeouts] -> ShowS # | |
HasNewsletterTimeouts NewsletterTimeouts Source # | |
class HasNewsletterTimeouts c where Source #
newsletterTimeouts :: Lens' c NewsletterTimeouts Source #
nltGrace :: Lens' c Integer Source #
nltSubTimeout :: Lens' c Integer Source #
class HasNlTemplates c m | c -> m where Source #
nlTemplates :: Lens' c (NlTemplates m) Source #
confirmConfirmed :: HasApiRoot m => Getter c (Address -> m Html) Source #
confirmStart :: HasApiRoot m => Getter c (Address -> m Html) Source #
optInEmail :: HasApiRoot m => Getter c (Address -> m (Address -> Mail)) Source #
subStartPage :: HasApiRoot m => Getter c (Text -> Text -> Text -> Text -> m Html) Source #
subStartSubmitted :: HasApiRoot m => Getter c (Address -> m Html) Source #
unsubConfirmTempl :: HasApiRoot m => Getter c (Address -> m Html) Source #
unsubTempl :: HasApiRoot m => Getter c (Address -> m Html) Source #
Instances
HasNlTemplates (NlTemplates m) m Source # | |
Defined in Network.Mail.Newsletter.Web.Templates nlTemplates :: Lens' (NlTemplates m) (NlTemplates m) Source # confirmConfirmed :: Getter (NlTemplates m) (Address -> m Html) Source # confirmStart :: Getter (NlTemplates m) (Address -> m Html) Source # optInEmail :: Getter (NlTemplates m) (Address -> m (Address -> Mail)) Source # subStartPage :: Getter (NlTemplates m) (Text -> Text -> Text -> Text -> m Html) Source # subStartSubmitted :: Getter (NlTemplates m) (Address -> m Html) Source # unsubConfirmTempl :: Getter (NlTemplates m) (Address -> m Html) Source # unsubTempl :: Getter (NlTemplates m) (Address -> m Html) Source # |
data NlTemplates m Source #
NlTemplates | |
|
Instances
HasNlTemplates (NlTemplates m) m Source # | |
Defined in Network.Mail.Newsletter.Web.Templates nlTemplates :: Lens' (NlTemplates m) (NlTemplates m) Source # confirmConfirmed :: Getter (NlTemplates m) (Address -> m Html) Source # confirmStart :: Getter (NlTemplates m) (Address -> m Html) Source # optInEmail :: Getter (NlTemplates m) (Address -> m (Address -> Mail)) Source # subStartPage :: Getter (NlTemplates m) (Text -> Text -> Text -> Text -> m Html) Source # subStartSubmitted :: Getter (NlTemplates m) (Address -> m Html) Source # unsubConfirmTempl :: Getter (NlTemplates m) (Address -> m Html) Source # unsubTempl :: Getter (NlTemplates m) (Address -> m Html) Source # |
defTemplates :: (HasClientSessionKey k, HasApiRoot m, MonadReader k m, MonadIO m, IsElem NewsletterSubConfirmGet (ApiRoot m)) => NlTemplates m Source #
serveNewsletter :: (HasClientSessionKey r, HasApiRoot m, HasNlTemplates r m, IsElem NewsletterUnsubGet (ApiRoot m), MonadReader r m, MonadError ServantErr m, Newsletter m, DedupSubscriptions m, HasNewsletterTimeouts r, HasAllowedOrigins r, MonadIO m) => ServerT NewsletterAPI m Source #