yu-core-0.1.1.2: The core of Yu.

Copyright(C) 2017-2018 Johann Lee <me@qinka.pro>
Maintainerme@qinka.pro
Safe HaskellNone
LanguageHaskell2010

Yu.Core.Model

Contents

Description

License : GPL3 Stability : experimental Portability : unknown

The codes for model

Synopsis

run database

runDb Source #

Arguments

:: Mongodic site m 
=> AccessMode

access mode

-> Database

database

-> Action m a

action

-> m a 

run mongo

runDbDefault Source #

Arguments

:: Mongodic site m 
=> Action m a

action

-> m a 

run mongo with default

model

fetchFrame :: forall m. MonadIO m => ResT -> Action m (Maybe Html) Source #

about frame

updateFrame :: forall m. MonadIO m => Text -> ResT -> Action m () Source #

fetchPost :: forall m. MonadIO m => ResT -> Action m (Maybe Html) Source #

about post

updatePost :: forall m. MonadIO m => Text -> ResT -> Action m () Source #

fetchResourceB :: forall m. MonadIO m => ResT -> Action m (Maybe ByteString) Source #

about binary resource

updateResourceB :: forall m. MonadIO m => Binary -> ResT -> Action m () Source #

fetchResourceT :: forall m. MonadIO m => ResT -> Action m (Maybe Text) Source #

about text resource

updateResourceT :: forall m. MonadIO m => Text -> ResT -> Action m () Source #

fetchStatic :: forall m. MonadIO m => ResT -> Action m (Maybe Text) Source #

about static

updateStatic :: forall m. MonadIO m => Text -> ResT -> Action m () Source #

fetchQuery :: forall m. MonadIO m => ResT -> Action m (Maybe Text) Source #

about query

updateQuery :: forall m. MonadIO m => Text -> ResT -> Action m () Source #

fetchMaybeI Source #

Arguments

:: MonadIO m 
=> (ResT -> Action m (Maybe a))

funcion for action

-> [Text]

index

-> Action m (Maybe a) 

fetch maybe index

fetchMaybeR Source #

Arguments

:: MonadIO m 
=> (ResT -> Action m (Maybe a))

function for action

-> Maybe ResT

index

-> Action m (Maybe a) 

fetch maybe resource

for navgation

fetchNav :: (MonadBaseControl IO m, MonadIO m) => Action m [Nav] Source #

fetch the nav

updateNav Source #

Arguments

:: MonadIO m 
=> Maybe Text

label

-> Maybe Text

url

-> Maybe Int

order

-> Action m () 

update nav

deleteNav Source #

Arguments

:: MonadIO m 
=> Maybe Text

label ( if it is Nothing, the all nav item will be delete)

-> Action m () 

delete the nav