Confuse.Fwup (Confuse v0.1.5)

View Source

Special-purpose functionality for usage of config files by the fwup tool.

Primarily to provide functionality for Nerves firmware update introspection.

Summary

Types

validation()

@type validation() :: %{
  delta_source_raw_offset?: boolean(),
  delta_source_raw_count?: boolean(),
  delta_source_raw_options_cipher?: boolean(),
  delta_source_raw_options_secret?: boolean(),
  raw_write?: boolean(),
  raw_write_cipher?: boolean(),
  raw_write_secret?: boolean(),
  raw_deltas_valid?: boolean(),
  delta_source_fat_offset?: boolean(),
  delta_source_fat_path?: boolean(),
  fat_write?: boolean(),
  fat_deltas_valid?: boolean()
}

Functions

get_delta_files(file)

@spec get_delta_files(file :: String.t()) ::
  {:ok, map()} | {:error, :parsing_failed | File.posix()}

get_feature_usage(file)

@spec get_feature_usage(file :: String.t()) ::
  {:ok, Confuse.Fwup.Features.t()} | {:error, :parsing_failed | File.posix()}

validate_delta(source_meta_conf, target_meta_conf, using_fwup_version \\ nil)

@spec validate_delta(
  source_meta_conf :: String.t(),
  target_meta_conf :: String.t(),
  using_fwup_version :: nil | Version.t()
) :: :ok | {:error, [String.t()]}