Presto v0.1.2 Presto View Source
Presto pages!
Link to this section Summary
Functions
Embed a component
Creates a new page process based on the page_module
, and page_key
.
Returns a tuple such as {:ok, page_key}
if successful. If there is an
issue, an {:error, reason}
tuple is returned
Send an event to a page
Finds an existing page process based on the page_module
, and page_key
.
If the page is not found, it is created and returned instead.
Returns a tuple such as {:ok, page_key}
if successful. If there is an
issue, an {:error, reason}
tuple is returned
Finds an existing page process based on the page_module
, and page_key
.
Returns a tuple such as {:ok, page_key}
if successful. If there is an
issue, an {:error, reason}
tuple is returned
Determines if a Presto.Page
process exists, based on the page_key
provided. Returns a boolean
Link to this section Types
page_create() :: {:ok, Presto.page_key} | {:error, term}
Link to this section Functions
component(page_module, page_key) :: any
Embed a component.
create_page(page_module, page_key) :: page_create
Creates a new page process based on the page_module
, and page_key
.
Returns a tuple such as {:ok, page_key}
if successful. If there is an
issue, an {:error, reason}
tuple is returned.
dispatch(page_module, page_key, page_event) :: any
Send an event to a page.
find_or_create_page(page_module, page_key) :: page_create
Finds an existing page process based on the page_module
, and page_key
.
If the page is not found, it is created and returned instead.
Returns a tuple such as {:ok, page_key}
if successful. If there is an
issue, an {:error, reason}
tuple is returned.
find_page(page_module, page_key) :: page_create
Finds an existing page process based on the page_module
, and page_key
.
Returns a tuple such as {:ok, page_key}
if successful. If there is an
issue, an {:error, reason}
tuple is returned.
page_exists?(page_module, page_key) :: boolean
Determines if a Presto.Page
process exists, based on the page_key
provided. Returns a boolean.
Example
iex> Presto.page_exists?(DemoPage, 6)
false