Safe Haskell | None |
---|---|
Language | Haskell2010 |
Meta-module that reexports many Imm sub-modules.
Synopsis
- data LogLevel
- log :: Handle m -> LogLevel -> Doc AnsiStyle -> m ()
- getLogLevel :: Handle m -> m LogLevel
- setLogLevel :: Handle m -> LogLevel -> m ()
- setColorizeLogs :: Handle m -> Bool -> m ()
- flushLogs :: Handle m -> m ()
- httpGet :: Handle m -> URI -> m LByteString
- get :: Monad m => Handle m -> Handle m -> URI -> m LByteString
- data FeedURI = FeedURI (URIRef a)
- data FeedElement
- data Feed
- = Rss (RssDocument '[ContentModule, DublinCoreModule])
- | Atom AtomFeed
- data FeedRef
- sameURIType :: URIRef a1 -> URIRef a2 -> Maybe (URIRef a1 :~: URIRef a2)
- withFeedURI :: (forall a. URIRef a -> b) -> FeedURI -> b
- renderFeed :: Feed -> Text
- renderFeedElement :: FeedElement -> Text
- parseFeed :: MonadCatch m => Text -> m Feed
- parseFeedElement :: MonadCatch m => Text -> m FeedElement
- removeElements :: Feed -> Feed
- getFeedTitle :: Feed -> Text
- getElements :: Feed -> [FeedElement]
- getDate :: FeedElement -> Maybe UTCTime
- getTitle :: FeedElement -> Text
- getContent :: FeedElement -> Text
- getLink :: FeedElement -> Maybe FeedURI
- getId :: FeedElement -> Text
- prettyElement :: FeedElement -> Doc a
- parseXml :: Handle m -> URI -> LByteString -> m Feed
- data DatabaseException t
- = NotCommitted t
- | NotDeleted t [Key t]
- | NotFound t [Key t]
- | NotInserted t [(Key t, Entry t)]
- | NotPurged t
- | NotUpdated t (Key t)
- | UnableFetchAll t
- _describeDatabase :: Handle m t -> m (Doc AnsiStyle)
- _fetchList :: Handle m t -> [Key t] -> m (Map (Key t) (Entry t))
- _fetchAll :: Handle m t -> m (Map (Key t) (Entry t))
- _update :: Handle m t -> Key t -> (Entry t -> Entry t) -> m ()
- _insertList :: Handle m t -> [(Key t, Entry t)] -> m ()
- _deleteList :: Handle m t -> [Key t] -> m ()
- _purge :: Handle m t -> m ()
- _commit :: Handle m t -> m ()
- class (Ord (Key t), Show (Key t), Show (Entry t), Typeable t, Show t, Pretty t, Pretty (Key t)) => Table t where
- readOnly :: Monad m => Pretty (Key t) => Handle m -> Handle m t -> Handle m t
- fetch :: Monad m => Table t => MonadThrow m => Handle m t -> Key t -> m (Entry t)
- fetchList :: Monad m => Handle m t -> [Key t] -> m (Map (Key t) (Entry t))
- fetchAll :: Monad m => Handle m t -> m (Map (Key t) (Entry t))
- update :: Monad m => Handle m t -> Key t -> (Entry t -> Entry t) -> m ()
- insert :: Monad m => Handle m -> Handle m t -> Key t -> Entry t -> m ()
- insertList :: Monad m => Handle m -> Handle m t -> [(Key t, Entry t)] -> m ()
- delete :: Monad m => Handle m -> Handle m t -> Key t -> m ()
- deleteList :: Monad m => Handle m -> Handle m t -> [Key t] -> m ()
- purge :: Monad m => Handle m -> Handle m t -> m ()
- commit :: Monad m => Handle m -> Handle m t -> m ()
- table :: Table t => Handle m t -> t
- data Message = Message Feed FeedElement
- data Callback = Callback {
- _executable :: FilePath
- _arguments :: [Text]
Documentation
getLogLevel :: Handle m -> m LogLevel Source #
setLogLevel :: Handle m -> LogLevel -> m () Source #
setColorizeLogs :: Handle m -> Bool -> m () Source #
get :: Monad m => Handle m -> Handle m -> URI -> m LByteString Source #
Simple wrapper around httpGet
that also logs the requested URI.
data FeedElement Source #
Instances
Eq FeedElement Source # | |
Defined in Imm.Feed (==) :: FeedElement -> FeedElement -> Bool # (/=) :: FeedElement -> FeedElement -> Bool # | |
Ord FeedElement Source # | |
Defined in Imm.Feed compare :: FeedElement -> FeedElement -> Ordering # (<) :: FeedElement -> FeedElement -> Bool # (<=) :: FeedElement -> FeedElement -> Bool # (>) :: FeedElement -> FeedElement -> Bool # (>=) :: FeedElement -> FeedElement -> Bool # max :: FeedElement -> FeedElement -> FeedElement # min :: FeedElement -> FeedElement -> FeedElement # | |
Show FeedElement Source # | |
Defined in Imm.Feed showsPrec :: Int -> FeedElement -> ShowS # show :: FeedElement -> String # showList :: [FeedElement] -> ShowS # | |
Pretty (PrettyKey FeedElement) Source # | |
Defined in Imm.Feed pretty :: PrettyKey FeedElement -> Doc ann # prettyList :: [PrettyKey FeedElement] -> Doc ann # |
Feed reference: either its URI, or its UID from database
withFeedURI :: (forall a. URIRef a -> b) -> FeedURI -> b Source #
renderFeed :: Feed -> Text Source #
renderFeedElement :: FeedElement -> Text Source #
parseFeedElement :: MonadCatch m => Text -> m FeedElement Source #
removeElements :: Feed -> Feed Source #
getFeedTitle :: Feed -> Text Source #
getElements :: Feed -> [FeedElement] Source #
getTitle :: FeedElement -> Text Source #
getContent :: FeedElement -> Text Source #
getId :: FeedElement -> Text Source #
prettyElement :: FeedElement -> Doc a Source #
data DatabaseException t Source #
NotCommitted t | |
NotDeleted t [Key t] | |
NotFound t [Key t] | |
NotInserted t [(Key t, Entry t)] | |
NotPurged t | |
NotUpdated t (Key t) | |
UnableFetchAll t |
Instances
(Eq t, Eq (Key t), Eq (Entry t)) => Eq (DatabaseException t) Source # | |
Defined in Imm.Database (==) :: DatabaseException t -> DatabaseException t -> Bool # (/=) :: DatabaseException t -> DatabaseException t -> Bool # | |
(Show t, Show (Key t), Show (Entry t)) => Show (DatabaseException t) Source # | |
Defined in Imm.Database showsPrec :: Int -> DatabaseException t -> ShowS # show :: DatabaseException t -> String # showList :: [DatabaseException t] -> ShowS # | |
(Table t, Show (Key t), Show (Entry t), Pretty (Key t), Typeable t) => Exception (DatabaseException t) Source # | |
Defined in Imm.Database toException :: DatabaseException t -> SomeException # fromException :: SomeException -> Maybe (DatabaseException t) # displayException :: DatabaseException t -> String # | |
(Pretty t, Pretty (Key t)) => Pretty (DatabaseException t) Source # | |
Defined in Imm.Database pretty :: DatabaseException t -> Doc ann # prettyList :: [DatabaseException t] -> Doc ann # |
_deleteList :: Handle m t -> [Key t] -> m () Source #
class (Ord (Key t), Show (Key t), Show (Entry t), Typeable t, Show t, Pretty t, Pretty (Key t)) => Table t where Source #
Generic database table
All information passed to external programs about a new feed item, are stored in this structure.
Instances
Eq Message Source # | |
Ord Message Source # | |
Show Message Source # | |
Generic Message Source # | |
ToJSON Message Source # | |
Defined in Imm.Callback | |
FromJSON Message Source # | |
type Rep Message Source # | |
Defined in Imm.Callback type Rep Message = D1 (MetaData "Message" "Imm.Callback" "imm-1.6.0.0-AI8t4wjrAX18Aalm5NPGfe" False) (C1 (MetaCons "Message" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Feed) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FeedElement))) |
External program run for each feed element.
A Message
is passed to this program through stdin, serialized in JSON.
Callback | |
|
Instances
Eq Callback Source # | |
Ord Callback Source # | |
Defined in Imm.Callback | |
Read Callback Source # | |
Show Callback Source # | |
Generic Callback Source # | |
Interpret Callback Source # | |
Defined in Imm.Callback autoWith :: InterpretOptions -> Type Callback # | |
Pretty Callback Source # | |
Defined in Imm.Callback | |
type Rep Callback Source # | |
Defined in Imm.Callback type Rep Callback = D1 (MetaData "Callback" "Imm.Callback" "imm-1.6.0.0-AI8t4wjrAX18Aalm5NPGfe" False) (C1 (MetaCons "Callback" PrefixI True) (S1 (MetaSel (Just "_executable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Just "_arguments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Text]))) |