Search documentation of grizzly

# View Source Grizzly.ZIPGateway.Config (grizzly v7.4.2)

Builds valid `zipgateway.cfg` based on Grizzly options.

# Summary

## Types

t()

## Functions

ensure_files(config)

Ensure required files are on disk and contain the correct contents

new(opts \\ %{})

Make a new `ZipgatewayCfg.t()` from the supplied options

to_string(cfg)

Turn the `ZipgatewayCfg.t()` into a string

write(cfg, path)

Write the contents of the `ZipgatewayCfg.t()` to the file system

# Types

Link to this type

# t()

View Source

    @type t() :: %Grizzly.ZIPGateway.Config{
      ca_cert: Path.t(),
      cert: Path.t(),
      database_file: Path.t() | nil,
      eeprom_file: Path.t() | nil,
      extra_classes: [byte()],
      extra_config: String.t() | nil,
      hardware_version: non_neg_integer() | nil,
      identify_script: term(),
      lan_gw6: String.t(),
      lan_ip: :inet.ip_address(),
      manufacturer_id: non_neg_integer() | nil,
      pan_ip: :inet.ip_address(),
      power_level:
        {Grizzly.Supervisor.tx_power(), Grizzly.Supervisor.measured_power()} | nil,
      priv_key: Path.t(),
      product_id: non_neg_integer() | nil,
      product_type: non_neg_integer() | nil,
      provisioning_config_file: Path.t(),
      psk: String.t(),
      pvs_storage_file: Path.t(),
      rf_region: Grizzly.Supervisor.rf_region() | nil,
      serial_log: String.t() | nil,
      tun_script: Path.t(),
      unsolicited_destination: {:inet.ip_address(), :inet.port_number()}
    }

# Functions

Link to this function

# ensure_files(config)

View Source

    @spec ensure_files(t()) :: t()

Ensure required files are on disk and contain the correct contents

This is useful to ensure other tools provided by `zipgateway` can work.

Link to this function

# new(opts \\ %{})

View Source

    @spec new(map()) :: t()

Make a new `ZipgatewayCfg.t()` from the supplied options

Link to this function

# to_string(cfg)

View Source

    @spec to_string(t()) :: String.t()

Turn the `ZipgatewayCfg.t()` into a string

Link to this function

# write(cfg, path)

View Source

    @spec write(t(), Path.t()) :: :ok | {:error, File.posix()}

Write the contents of the `ZipgatewayCfg.t()` to the file system