Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ApiaryT exts prms actM m a
- runApiaryTWith :: (Monad actM, Monad m) => (forall b. actM b -> IO b) -> (Application -> m a) -> Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] actM m () -> m a
- runApiaryWith :: Monad m => (Application -> m a) -> Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] IO m () -> m a
- runApiary :: Monad m => (Application -> m a) -> ApiaryConfig -> ApiaryT '[] '[] IO m () -> m a
- getApiaryTWith :: (Monad actM, Monad m) => (forall b. actM b -> IO b) -> Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] actM m () -> m Application
- getApiaryWith :: Monad m => Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] IO m () -> m Application
- getApiary :: Monad m => ApiaryConfig -> ApiaryT '[] '[] IO m () -> m Application
- data ApiaryConfig = ApiaryConfig {}
- action :: Monad actM => ActionT exts prms actM () -> ApiaryT exts prms actM m ()
- middleware :: Monad actM => Middleware -> ApiaryT exts prms actM m ()
- group :: Text -> Filter' exts actM m
- document :: Text -> Filter' exts actM m
- precondition :: Html -> Filter' exts actM m
- noDoc :: Filter' exts actM m
- apiaryConfig :: Monad actM => ApiaryT exts prms actM m ApiaryConfig
- apiaryExt :: (Has e exts, Monad actM) => proxy e -> ApiaryT exts prms actM m e
Documentation
data ApiaryT exts prms actM m a Source #
Apiary monad. since 0.8.0.0.
(Monad actM, MonadBase b m) => MonadBase b (ApiaryT exts prms actM m) Source # | |
(Monad actM, MonadBaseControl b m) => MonadBaseControl b (ApiaryT exts prms actM m) Source # | |
Monad actM => MonadExts exts (ApiaryT exts prms actM m) Source # | |
Monad actM => MonadTrans (ApiaryT exts prms actM) Source # | |
Monad actM => MonadTransControl (ApiaryT exts prms actM) Source # | |
Monad actM => Monad (ApiaryT exts prms actM m) Source # | |
Functor (ApiaryT exts prms actM m) Source # | |
Monad actM => Applicative (ApiaryT exts prms actM m) Source # | |
(Monad actM, MonadIO m) => MonadIO (ApiaryT exts prms actM m) Source # | |
type StT (ApiaryT exts prms actM) a Source # | |
type StM (ApiaryT exts prms actM m) a Source # | |
Runner
Apiary -> Application
runApiaryTWith :: (Monad actM, Monad m) => (forall b. actM b -> IO b) -> (Application -> m a) -> Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] actM m () -> m a Source #
run Apiary monad.
runApiaryWith :: Monad m => (Application -> m a) -> Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] IO m () -> m a Source #
runApiary :: Monad m => (Application -> m a) -> ApiaryConfig -> ApiaryT '[] '[] IO m () -> m a Source #
getApiaryTWith :: (Monad actM, Monad m) => (forall b. actM b -> IO b) -> Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] actM m () -> m Application Source #
get Application
from Apiary monad. since 2.0.0.
getApiaryWith :: Monad m => Initializer m '[] exts -> ApiaryConfig -> ApiaryT exts '[] IO m () -> m Application Source #
getApiary :: Monad m => ApiaryConfig -> ApiaryT '[] '[] IO m () -> m Application Source #
data ApiaryConfig Source #
ApiaryConfig | |
|
execute action
action :: Monad actM => ActionT exts prms actM () -> ApiaryT exts prms actM m () Source #
splice ActionT to ApiaryT.
middleware
middleware :: Monad actM => Middleware -> ApiaryT exts prms actM m () Source #
add middleware.
please note that, this method just provide a shortcut to stack middleware. middlewares are added to whole Apiary application rather than specific route.
API documentation
group :: Text -> Filter' exts actM m Source #
API document group. since 0.12.0.0.
only top level group recognized.
document :: Text -> Filter' exts actM m Source #
add API document. since 0.12.0.0.
It use only filters prior document, so you should be placed document directly in front of action.
precondition :: Html -> Filter' exts actM m Source #
add user defined precondition. since 0.13.0.
not export from Web.Apiary
apiaryConfig :: Monad actM => ApiaryT exts prms actM m ApiaryConfig Source #
get Apiary configuration.