Kanta.Config (kanta v0.4.2)

Kanta configuration helper

Summary

Functions

Generate a Config struct after normalizing and verifying Kanta options.

Types

@type t() :: %Kanta.Config{
  disable_api_authorization: boolean(),
  endpoint: module(),
  id_parse_function: mfa() | (term() -> {:ok, term()} | term()),
  name: atom(),
  otp_name: atom(),
  plugins: false | [module() | {module() | Keyword.t()}],
  repo: module()
}

Functions

Generate a Config struct after normalizing and verifying Kanta options.

See Kanta.start_link/1 for a comprehensive description of available options.

Example

Generate a minimal config with only a :repo:

Kanta.Config.new(repo: Kanta.Test.Repo)