udia v0.1.3 Udia.Logs View Source

The boundary for the Logs system.

Link to this section Summary

Functions

Returns an %Ecto.Changeset{} for tracking comment changes

Returns an %Ecto.Changeset{} for tracking journey changes

Returns an %Ecto.Changeset{} for tracking post changes

Deletes a Comment

Deletes a Journey

Deletes a Post

Gets a single comment

Gets a single journey

Gets a single post

Returns the list of comments

Returns the list of journeys

Returns the list of posts

Link to this section Functions

Returns an %Ecto.Changeset{} for tracking comment changes.

Examples

iex> change_comment(comment)
%Ecto.Changeset{source: %Comment{}}

Returns an %Ecto.Changeset{} for tracking journey changes.

Examples

iex> change_journey(journey)
%Ecto.Changeset{source: %Journey{}}

Returns an %Ecto.Changeset{} for tracking post changes.

Examples

iex> change_post(post)
%Ecto.Changeset{source: %Post{}}
Link to this function create_comment(user, attrs \\ %{}) View Source

Creates a comment.

Examples

iex> create_comment(%{field: value})
{:ok, %Comment{}}

iex> create_comment(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function create_journey(user, attrs \\ %{}) View Source

Creates a journey.

Examples

iex> create_journey(%{field: value})
{:ok, %Journey{}}

iex> create_journey(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function create_post(user, attrs \\ %{}) View Source

Creates a post.

Examples

iex> create_post(%{field: value})
{:ok, %Post{}}

iex> create_post(%{field: bad_value})
{:error, %Ecto.Changeset{}}

Deletes a Comment.

Examples

iex> delete_comment(comment)
{:ok, %Comment{}}

iex> delete_comment(comment)
{:error, %Ecto.Changeset{}}

Deletes a Journey.

Examples

iex> delete_journey(journey)
{:ok, %Journey{}}

iex> delete_journey(journey)
{:error, %Ecto.Changeset{}}

Deletes a Post.

Examples

iex> delete_post(post)
{:ok, %Post{}}

iex> delete_post(post)
{:error, %Ecto.Changeset{}}

Gets a single comment.

Raises Ecto.NoResultsError if the Comment does not exist.

Examples

iex> get_comment!(123)
%Comment{}

iex> get_comment!(456)
** (Ecto.NoResultsError)

Gets a single journey.

Raises Ecto.NoResultsError if the Journey does not exist.

Examples

iex> get_journey!(123)
%Journey{}

iex> get_journey!(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)

Returns the list of comments.

Examples

iex> list_comments()
[%Comment{}, ...]

Returns the list of journeys.

Examples

iex> list_journeys()
[%Journey{}, ...]

Returns the list of posts.

Examples

iex> list_posts()
[%Post{}, ...]
Link to this function update_comment(user, comment, attrs) View Source

Updates a comment.

Examples

iex> update_comment(comment, %{field: new_value})
{:ok, %Comment{}}

iex> update_comment(comment, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function update_journey(user, journey, attrs) View Source

Updates a journey.

Examples

iex> update_journey(journey, %{field: new_value})
{:ok, %Journey{}}

iex> update_journey(journey, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function update_post(user, post, attrs) View Source

Updates a post.

Examples

iex> update_post(post, %{field: new_value})
{:ok, %Post{}}

iex> update_post(post, %{field: bad_value})
{:error, %Ecto.Changeset{}}