To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
Library
Module
Module type
Parameter
Class
Class type
A module of type CONTROLLER
can be used to create a resource with resource_of_controller
. Use a controller instead of a service and a view if you need low level control.
val index : string -> Request.t -> Response.t Lwt.t
index name request
returns a list of all resource instances as a response.
name
is the name of the resource in plural, for example orders
or users
.
val new' : ?key:string -> string -> Request.t -> Response.t Lwt.t
new' ?key name request
returns a form to create instances of the resource as a response.
name
is the name of the resource in plural, for example orders
or users
.
The form data is stored in the flash storage under the key
. By default, the value is _form
.
val create :
string ->
('a, 'b, t) Conformist.t ->
Request.t ->
Response.t Lwt.t
create name schema request
handles the creation of new resource instances and returns the creation result as a response.
name
is the name of the resource in plural, for example orders
or users
.
val show : string -> Request.t -> Response.t Lwt.t
show name request
returns a single resource instance as a response.
name
is the name of the resource in plural, for example orders
or users
.
val edit : ?key:string -> string -> Request.t -> Response.t Lwt.t
edit ?key name request
returns a form to edit resource instances as a response.
name
is the name of the resource in plural, for example orders
or users
.
The form data is stored in the flash storage under the key
. By default, the value is _form
.
val update :
string ->
('a, 'b, t) Conformist.t ->
Request.t ->
Response.t Lwt.t
update name schema request
handles the update of a resource instance and returns the update result as a response.
name
is the name of the resource in plural, for example orders
or users
.
val delete' : string -> Request.t -> Response.t Lwt.t
delete name request
handles the deletion of a resource instance and returns the deletion result as a response.
name
is the name of the resource in plural, for example orders
or users
.