MongoosePush v2.1.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
Specs
error() :: {error_type(), error_reason()}
Error tuple with unified internal representation and exact reason returned by service
Specs
error_reason() :: atom()
Specs
error_type() :: :invalid_request | :internal_config | :auth | :unregistered | :too_many_requests | :unspecified | :service_internal | :payload_too_large | :unknown
Specs
notification() :: term()
Specs
options() :: [Keyword.t()]
Link to this section Callbacks
Specs
choose_pool(MongoosePush.mode(), [atom()]) :: MongoosePush.Application.pool_name() | nil
Specs
prepare_notification( String.t(), MongoosePush.request(), MongoosePush.Application.pool_name() ) :: notification()
Specs
push( notification(), String.t(), MongoosePush.Application.pool_name(), options() ) :: :ok | {:error, error()} | {:error, MongoosePush.error()}