exhtml v0.4.0-beta.2 Exhtml.Table
Exhtml.Table provides a place to set and get HTML contents by slug.
Examples:
iex> {:ok, pid} = Exhtml.Table.start_link []
...> Exhtml.Table.set(pid, :foo, :bar)
:ok
...> Exhtml.Table.get(pid, :foo)
:bar
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Gets content of the slug from the store
Gets content of the slug from the store since the time
Removes content of the slug from the store
Sets content of the slug into the store
Starts a Exhtml.Table process.
opts
- options for starting the process:repo
- the pid of started Exhtml.Repo server. If unprovided, all request to Exhtml.Table will return{:error, :repo_not_started}
Returns{:ok, pid}
if succeed,{:error, reason}
otherwise
Start the repo engine. Before starting a repo, all actions will not be performed and
{:error, :repo_not_started}
will be returned
Link to this section Types
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Gets content of the slug from the store.
server
- PID or name of the serverslug
- key of the content
get_since(server(), slug(), DateTime.t()) :: any()
Gets content of the slug from the store since the time.
server
- PID or name of the serverslug
- key of the contentsince
- modiefied time
Removes content of the slug from the store.
server
- PID or name of the serverslug
- key of the content
Sets content of the slug into the store.
server
- PID or name of the serverslug
- key of the contentcontent
- the content for the slug
Examples:
iex> {:ok, pid} = Exhtml.Table.start_link []
...> Exhtml.Table.set(pid, :foo, :bar)
:ok
iex> Exhtml.Table.get(pid, :foo)
:bar
Starts a Exhtml.Table process.
opts
- options for starting the process:repo
- the pid of started Exhtml.Repo server. If unprovided, all request to Exhtml.Table will return{:error, :repo_not_started}
Returns{:ok, pid}
if succeed,{:error, reason}
otherwise.
Start the repo engine. Before starting a repo, all actions will not be performed and
{:error, :repo_not_started}
will be returned.