Module

Stetson.HandlerProxy

Package
erl-stetson
Repository
id3as/purescript-erl-stetson

#self Source

self :: forall msg. Effect (Process msg)

#ElidedInitResult Source

#restInitResult Source

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

#wsInitResult Source

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

#loopInitResult Source

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

#State Source

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

#InitHandler Source

#init Source

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

#terminate Source

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

#resource_exists Source

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

#allowed_methods Source

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

#malformed_request Source

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

#previously_existed Source

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

#allow_missing_post Source

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

#moved_permanently Source

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

#moved_temporarily Source

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

#service_available Source

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

#is_authorized Source

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

#is_conflict Source

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

#forbidden Source

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

#delete_resource Source

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

#content_types_accepted Source

#content_types_provided Source

#callMap Source

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 Source

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

#mapReply Source

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

#restResult Source

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

#noCall Source

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

#accept Source

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

#provide Source

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

#accept_0 Source

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

#accept_1 Source

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

#accept_2 Source

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

#accept_3 Source

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

#accept_4 Source

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

#accept_5 Source

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

#accept_6 Source

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

#provide_0 Source

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

#provide_1 Source

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

#provide_2 Source

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

#provide_3 Source

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

#provide_4 Source

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

#provide_5 Source

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

#provide_6 Source

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

#wsState Source

wsState :: forall msg. Effect (Process msg)

#websocket_init Source

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

#websocket_handle Source

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

#websocket_info Source

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

#transformWsResult Source

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

#loopState Source

loopState :: forall msg. Effect (Process msg)

#info Source

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

#transformLoopResult Source

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

#applyLoopInit Source

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

#switchHandler Source

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