View Source Hologram.Assets.PathRegistry behaviour (hologram v0.2.0)
Summary
Callbacks
Returns the name of the ETS table used by the asset path registry registered process.
Returns the process name registered for the the asset path registry.
Returns the path of the static dir used by the asset path registry registered process.
Functions
Returns a specification to start this module under a supervisor.
Returns the implementation of the asset path registry's ETS table name.
Returns the asset path mapping.
Returns the asset path mapping.
Looks up the asset path (that includes the digest) of the given static file located in static dir. If there is no matching entry for the given static file then :error atom is returned.
Returns the implementation of the asset path registry's process name.
Registers the given asset path under the given static path key in the registry.
Reloads the path registry data.
Starts asset path registry process.
Returns the implementation of the asset path registry's static dir path.
Callbacks
@callback ets_table_name() :: atom()
Returns the name of the ETS table used by the asset path registry registered process.
@callback process_name() :: atom()
Returns the process name registered for the the asset path registry.
@callback static_dir() :: String.t()
Returns the path of the static dir used by the asset path registry registered process.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec ets_table_name() :: atom()
Returns the implementation of the asset path registry's ETS table name.
Returns the asset path mapping.
@spec handle_call(:get_mapping, GenServer.from(), nil) :: {:reply, %{required(String.t()) => String.t()}, nil}
Returns the asset path mapping.
Looks up the asset path (that includes the digest) of the given static file located in static dir. If there is no matching entry for the given static file then :error atom is returned.
@spec process_name() :: atom()
Returns the implementation of the asset path registry's process name.
Registers the given asset path under the given static path key in the registry.
@spec reload() :: :ok
Reloads the path registry data.
@spec start_link([]) :: GenServer.on_start()
Starts asset path registry process.
@spec static_dir() :: String.t()
Returns the implementation of the asset path registry's static dir path.