GenRouter.Conn (gen_router v0.1.8)
Structure which represents connection with Telegram bot. Inspired by %Plug.Conn{}, adapted for bots.
Attributes:
- skip: system buffer to keep track of skipped scopes;
- path: route to controller which should handle this object;
- params: payload which will be passed to controller;
- assigns: non-parsed data assigned by a system (auth, etc);
- scope: local scope of current request, clears for each new route;
- code: response code, we use common HTTP codes, currently only 200 is supported;
- response: response payload, usually JSON;
- halted: stop the pipeline execution if conn was settled.
Summary
Functions
Assign variable to current request.
Build Conn object with system fields
Update state and complete the current request.
Put the next path after the current request.
Halt execution pipeline, Conn is settled.
Reset router matching pipeline
Types
Functions
Assign variable to current request.
Build Conn object with system fields
Update state and complete the current request.
Put the next path after the current request.
It unhalts settled conn, so all the pipelines will be executed again.
Halt execution pipeline, Conn is settled.
Reset router matching pipeline