MongoosePush v2.0.0 MongoosePush.Service behaviour View Source

Generic interface for push notifications services.

Link to this section Summary

Types

Error tuple with unified internal representation and exact reason returned by service

Link to this section Types

Error tuple with unified internal representation and exact reason returned by service

Link to this type

error_reason()

View Source
error_reason() :: atom()
Link to this type

error_type()

View Source
error_type() ::
  :invalid_request
  | :internal_config
  | :auth
  | :unregistered
  | :too_many_requests
  | :unspecified
  | :service_internal
  | :payload_too_large
  | :unknown
Link to this type

notification()

View Source
notification() :: term()

Link to this section Callbacks

Link to this callback

choose_pool(arg1)

View Source
choose_pool(MongoosePush.mode()) :: MongoosePush.Application.pool_name() | nil
Link to this callback

prepare_notification(arg1, arg2, arg3)

View Source
prepare_notification(
  String.t(),
  MongoosePush.request(),
  MongoosePush.Application.pool_name()
) :: notification()
Link to this callback

push(notification, arg2, arg3, options)

View Source
push(
  notification(),
  String.t(),
  MongoosePush.Application.pool_name(),
  options()
) :: :ok | {:error, error()} | {:error, MongoosePush.error()}
Link to this callback

supervisor_entry(arg1)

View Source
supervisor_entry([MongoosePush.Application.pool_definition()] | nil) ::
  {module(), term()}