Module

Stetson.HandlerProxy

#self

self :: forall msg. Effect (Process msg)

#ElidedInitResult

#restInitResult

restInitResult :: forall msg state. State msg state -> Req -> ElidedInitResult

#wsInitResult

wsInitResult :: forall msg state. State msg state -> Req -> ElidedInitResult

#loopInitResult

loopInitResult :: forall msg state. State msg state -> Req -> ElidedInitResult

#State

type State msg state = { acceptHandlers :: List (Req -> state -> Effect (RestResult AcceptHandlerResult state)), handler :: StetsonHandlerCallbacks msg state, innerState :: state, provideHandlers :: List (Req -> state -> Effect (RestResult IOData state)) }

#InitHandler

#init

init :: forall msg state. EffectFn2 Req (State msg state) ElidedInitResult

#terminate

terminate :: forall msg state. EffectFn3 Foreign Req (State msg state) Atom

#resource_exists

resource_exists :: forall msg state. ResourceExistsHandler (State msg state)

#allowed_methods

allowed_methods :: forall msg state. AllowedMethodsHandler (State msg state)

#malformed_request

malformed_request :: forall msg state. MalformedRequestHandler (State msg state)

#previously_existed

previously_existed :: forall msg state. PreviouslyExistedHandler (State msg state)

#allow_missing_post

allow_missing_post :: forall msg state. PreviouslyExistedHandler (State msg state)

#moved_permanently

moved_permanently :: forall msg state. MovedPermanentlyHandler (State msg state)

#moved_temporarily

moved_temporarily :: forall msg state. MovedTemporarilyHandler (State msg state)

#service_available

service_available :: forall msg state. ServiceAvailableHandler (State msg state)

#is_authorized

is_authorized :: forall msg state. IsAuthorizedHandler (State msg state)

#is_conflict

is_conflict :: forall msg state. IsConflictHandler (State msg state)

#forbidden

forbidden :: forall msg state. ForbiddenHandler (State msg state)

#delete_resource

delete_resource :: forall msg state. DeleteResourceHandler (State msg state)

#content_types_accepted

#content_types_provided

#callMap

callMap :: forall msg state reply mappedReply. (reply -> mappedReply) -> Maybe (Req -> state -> Effect (RestResult reply state)) -> Req -> (State msg state) -> Effect (RestResult mappedReply (State msg state))

#call

call :: forall msg state reply. Maybe (Req -> state -> Effect (RestResult reply state)) -> Req -> State msg state -> Effect (RestResult reply (State msg state))

#mapReply

mapReply :: forall state reply mappedReply. (reply -> mappedReply) -> Effect (RestResult reply state) -> Effect (RestResult mappedReply state)

#restResult

restResult :: forall reply msg state. State msg state -> Maybe (Effect (RestResult reply state)) -> Effect (RestResult reply (State msg state))

#noCall

noCall :: forall t3 t4. Applicative t3 => t3 t4

#accept

accept :: forall msg state. Int -> EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#provide

provide :: forall msg state. Int -> EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#accept_0

accept_0 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#accept_1

accept_1 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#accept_2

accept_2 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#accept_3

accept_3 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#accept_4

accept_4 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#accept_5

accept_5 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#accept_6

accept_6 :: forall msg state. EffectFn2 Req (State msg state) (RestResult AcceptHandlerResult (State msg state))

#provide_0

provide_0 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#provide_1

provide_1 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#provide_2

provide_2 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#provide_3

provide_3 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#provide_4

provide_4 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#provide_5

provide_5 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#provide_6

provide_6 :: forall msg state. EffectFn2 Req (State msg state) (RestResult IOData (State msg state))

#wsState

wsState :: forall msg. Effect (Process msg)

#websocket_init

websocket_init :: forall msg state. WSInitHandler (State msg state)

#websocket_handle

websocket_handle :: forall msg state. FrameHandler (State msg state)

#websocket_info

websocket_info :: forall msg state. InfoHandler msg (State msg state)

#transformWsResult

transformWsResult :: forall msg state. State msg state -> WebSocketCallResult state -> Effect (CallResult (State msg state))

#loopState

loopState :: forall msg. Effect (Process msg)

#info

info :: forall msg state. InfoHandler msg (State msg state)

#transformLoopResult

transformLoopResult :: forall msg state. State msg state -> LoopCallResult state -> Effect (InfoResult (State msg state))

#applyLoopInit

applyLoopInit :: forall msg state. StetsonHandlerCallbacks msg state -> Req -> state -> Effect state

#switchHandler

switchHandler :: forall reply msg state. CowboyHandler -> Req -> State msg state -> Effect (RestResult reply (State msg state))

Modules