View Source Pigeon.ADM.Config (Pigeon v1.6.3)

Validates configuration settings that initialize ADM.Worker instances.

Summary

Functions

Returns a new ADM.Config with given opts.

Returns whether a given config has valid credentials.

Types

@type t() :: %Pigeon.ADM.Config{
  client_id: String.t() | nil,
  client_secret: String.t() | nil,
  name: atom() | nil
}

Functions

@spec new(Keyword.t() | atom()) :: t()

Returns a new ADM.Config with given opts.

Examples

iex> Pigeon.ADM.Config.new(
...>   name: :test,
...>   client_id: "amzn.client.id",
...>   client_secret: "1234secret"
...> )
%Pigeon.ADM.Config{name: :test, client_id: "amzn.client.id",
client_secret: "1234secret"}

Returns whether a given config has valid credentials.

Examples

iex> :adm_default |> new() |> valid?()
true
@spec validate!(any()) :: :ok | no_return()