udia v0.1.1 Udia.Logs
The boundary for the Logs system.
Summary
Functions
Returns an %Ecto.Changeset{}
for tracking category changes
Returns an %Ecto.Changeset{}
for tracking post changes
Creates a category
Creates a post
Deletes a Category
Deletes a Post
Gets a single category
Gets a single post
Returns the list of categories
Return the list of posts
Updates a category
Updates a post
Functions
Returns an %Ecto.Changeset{}
for tracking category changes.
Examples
iex> change_category(category)
%Ecto.Changeset{source: %Category{}}
Returns an %Ecto.Changeset{}
for tracking post changes.
Examples
iex> change_post(post)
%Ecto.Changeset{source: %Post{}}
Creates a category.
Examples
iex> create_category(category, %{field: value})
{:ok, %Category{}}
iex> create_category(category, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a post.
Examples
iex> create_post(post, %{field: value})
{:ok, %Post{}}
iex> create_post(post, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a Category.
Examples
iex> delete_category(category)
{:ok, %Category{}}
iex> delete_category(category)
{:error, %Ecto.Changeset{}}
Deletes a Post.
Examples
iex> delete_post(post)
{:ok, %Post{}}
iex> delete_post(post)
{:error, %Ecto.Changeset{}}
Gets a single category.
Raises Ecto.NoResultsError
if the Category does not exist.
Examples
iex> get_category!(123)
%Category{}
iex> get_category!(456)
** (Ecto.NoResultsError)
Gets a single post.
Raises Ecto.NoResultsError
if the Post does not exist.
Examples
iex> get_post!(123)
%Post{}
iex> get_post!(456)
** (Ecto.NoResultsError)