View Source Beacon.Types.Site (Beacon v0.3.3)
Sites are identified as atoms and stored as string in the database.
Summary
Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Returns true
if site
is valid, otherwise returns false
.
Types
@type t() :: atom()
Atom to identify a site, eg: :my_site
Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Returns true
if site
is valid, otherwise returns false
.
A site is valid if it's a atom with no special characters, except _
.
Examples
iex> valid?(:my_site)
true
iex> valid?(:"my-site!")
false