View Source cowmachine_controller (cowmachine v1.12.1)
Link to this section Summary
Link to this section Types
-type cmstate() ::
#cmstate{controller :: atom(),
is_process_called :: boolean(),
cache :: map(),
options :: map()}.
Link to this section Functions
-spec do(Fun, State, Context) -> Result when Fun :: atom(), State :: cmstate(), Context :: cowmachine_req:context(), Result :: {ContentType, Context}, ContentType :: cow_http_hd:media_type().
Fun
.
-spec do_process(ContentType, State, Context) -> Result when ContentType :: cow_http_hd:media_type(), State :: cmstate(), Context :: cowmachine_req:context(), Result :: {Res, Context}, Res :: boolean() | cowmachine_req:halt() | {error, any(), any()} | {error, any()} | cowmachine_req:resp_body().
State
with Context
.