pinpon-0.2.0.2: A gateway for various cloud notification services

Safe HaskellNone
LanguageHaskell2010

Network.PinPon.Config

Contents

Synopsis

Types

newtype App a Source #

Constructors

App 

Instances

Monad App Source # 

Methods

(>>=) :: App a -> (a -> App b) -> App b #

(>>) :: App a -> App b -> App b #

return :: a -> App a #

fail :: String -> App a #

Functor App Source # 

Methods

fmap :: (a -> b) -> App a -> App b #

(<$) :: a -> App b -> App a #

Applicative App Source # 

Methods

pure :: a -> App a #

(<*>) :: App (a -> b) -> App a -> App b #

liftA2 :: (a -> b -> c) -> App a -> App b -> App c #

(*>) :: App a -> App b -> App b #

(<*) :: App a -> App b -> App a #

MonadIO App Source # 

Methods

liftIO :: IO a -> App a #

MonadThrow App Source # 

Methods

throwM :: Exception e => e -> App a #

MonadCatch App Source # 

Methods

catch :: Exception e => App a -> (e -> App a) -> App a #

MonadResource App Source # 

Methods

liftResourceT :: ResourceT IO a -> App a #

MonadReader Config App Source # 

Methods

ask :: App Config #

local :: (Config -> Config) -> App a -> App a #

reader :: (Config -> a) -> App a #

MonadError ServantErr App Source # 

Methods

throwError :: ServantErr -> App a #

catchError :: App a -> (ServantErr -> App a) -> App a #

MonadBase IO App Source # 

Methods

liftBase :: IO α -> App α #

createConfig :: Region -> Credentials -> Text -> IO Config Source #

Given an AWS Region and a Credentials descriptor, create an SNS topic with the given Text name, and return a pinpon server Config for the topic. Notifications sent to the pinpon server using this Config will be relayed to the SNS topic for delivery to the topic's subscribers.

The initial set of platforms in the newly-created Config is empty. If you want to send platform-specific messages, add the desired platform(s) to the Configs platform set after creating the Config.

Note that if the topic already exists with the given credentials and region, then this operation is idempotent.

data Platform Source #

pinpon can deliver platform-specific messages via Amazon SNS for the following platforms.

Note that, though it is not listed here, pinpon supports delivery via SNS to email addresses. This support is always enabled.

Platforms not specifically supported by pinpon will still receive notifications, but those notifications will not have any platform-specific features; clients on those platforms will receive only the notification message text. (See Network.PinPon.Notification.Notification.)

Constructors

APNS

Apple's APN service

APNSSandbox

Apple's APN sandbox service

Lenses

env :: HasConfig c => Lens' c Env Source #

arn :: HasConfig c => Lens' c Text Source #

platforms :: HasConfig c => Lens' c (Set Platform) Source #