Module

Stetson.HandlerProxy

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

#ElidedInitResult Source

#restInitResult Source

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

#wsInitResult Source

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

#loopInitResult Source

loopInitResult :: forall state msg. 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 String state)) }

#InitHandler Source

#init Source

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

#resource_exists Source

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

#allowed_methods Source

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

#malformed_request Source

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

#previously_existed Source

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

#allow_missing_post Source

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

#moved_permanently Source

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

#moved_temporarily Source

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

#service_available Source

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

#is_authorized Source

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

#is_conflict Source

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

#forbidden Source

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

#delete_resource Source

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

#content_types_accepted Source

#content_types_provided Source

#callMap Source

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

#call Source

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

#mapReply Source

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

#restResult Source

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

#noCall Source

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

#accept Source

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

#provide Source

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

#accept_0 Source

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

#accept_1 Source

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

#accept_2 Source

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

#accept_3 Source

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

#accept_4 Source

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

#accept_5 Source

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

#accept_6 Source

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

#provide_0 Source

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

#provide_1 Source

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

#provide_2 Source

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

#provide_3 Source

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

#provide_4 Source

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

#provide_5 Source

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

#provide_6 Source

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

#wsState Source

#websocket_init Source

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

#router Source

router :: forall msg. Pid -> msg -> Effect Unit

#websocket_handle Source

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

#websocket_info Source

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

#transformWsResult Source

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

#loopState Source

loopState :: forall msg. Effect (LoopInternalState msg)

#info Source

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

#transformLoopResult Source

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

#applyLoopInit Source

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

#switchHandler Source

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