pushex v0.2.3 Pushex.AppManager behaviour View Source

Pushex.AppManager is used to retreive applications from their name.

By default, applications will be loaded from the configuration, but this behaviour can be implemented to get an app from a database for example.

Example

defmodule MyAppManager do
  @behaviour Pushex.AppManager

  def find_app(:gcm, name) do
    app = Repo.find_by(platform: gcm, name: name)
    %Pushex.GCM.App{name: name, auth_key: app.auth_key}
  end
end

Link to this section Summary

Link to this section Functions

Link to this function

find_app(platform, name)

View Source

Link to this section Callbacks

Link to this callback

find_app(platform, name)

View Source
find_app(platform :: atom(), name :: String.t()) :: Pushex.GCM.App