SaltDns.Registrar.Provider (Salt v1.0.0)

A registrar provider: an account at a domain registrar. adapter names the adapter that talks to it (see SaltDns.Registrar.Adapter); it must be one the installation has registered in its configuration.

The password is encrypted with the vault, context registrar_provider.password, and redacted from inspect/1. mode is :sandbox (the registrar's test system, the default) or :live. status says what the last connection test found: :new (never tested), :ok, :error (see last_error) or :disabled (an operator turned the account off; nothing is sent to it).

company_handle is the registrar's handle of the company contact that is used for the admin, tech and billing contacts of every name; the caller of an order sends only the owner contact. It is set once by the operator.

A provider with an organisation belongs to it (and serves its customers through its provisioning token); one without is shared, is created by the operator and serves only the organisations in allowed_organisation_ids, which the operator sets from the command line (SaltDns.Release.registrar_allow/2) and the changeset below cannot touch.

Summary

Functions

Changeset for the fields a person fills in. adapters is the list of registered adapter names (SaltDns.Registrar.adapter_names/0). On an existing provider a blank password keeps the stored one.

The modes.

The statuses.

Whether anything may be sent to the provider.

Types

t()

@type t() :: %SaltDns.Registrar.Provider{
  __meta__: term(),
  adapter: term(),
  allowed_organisation_ids: term(),
  company_handle: term(),
  id: term(),
  inserted_at: term(),
  last_error: term(),
  mode: term(),
  name: term(),
  organisation: term(),
  organisation_id: term(),
  password: term(),
  status: term(),
  updated_at: term(),
  username: term()
}

Functions

changeset(provider, attrs, adapters)

@spec changeset(t(), map(), [String.t()]) :: Ecto.Changeset.t()

Changeset for the fields a person fills in. adapters is the list of registered adapter names (SaltDns.Registrar.adapter_names/0). On an existing provider a blank password keeps the stored one.

modes()

@spec modes() :: [atom()]

The modes.

statuses()

@spec statuses() :: [atom()]

The statuses.

usable?(provider)

@spec usable?(t()) :: boolean()

Whether anything may be sent to the provider.