vintage_net_wizard v0.1.5 VintageNetWizard.WiFiConfiguration View Source
A WiFiConfiguration is used for clients to define the settings for a WiFi access point.
Link to this section Summary
Functions
Decode JSON string into WiFiConfiguration
Try to make a WiFiConfiguration from a map.
Make a new WiFiConfiguration struct
Take a WiFiConfiguration.t()
and turn into a map that
is used to configure VintageNet
Validate the password for the WiFiConfiguration
Link to this section Types
Link to this type
decode_error()
View Sourcedecode_error() :: {:error, :json_decode, Jason.DecodeError.t()} | {:error, param_error(), value :: any()}
Link to this type
opt()
View Sourceopt() :: {:key_mgmt, atom()} | {:password, binary()} | {:priority, non_neg_integer()}
Link to this type
t()
View Sourcet() :: %VintageNetWizard.WiFiConfiguration{ key_mgmt: key_mgmt(), password: String.t() | nil, priority: non_neg_integer() | nil, ssid: String.t() }
Link to this section Functions
Decode JSON string into WiFiConfiguration
Link to this function
from_map(params)
View Sourcefrom_map(map()) :: {:ok, t()} | {:error, param_error(), value :: any()} | {:error, :password_required, key_mgmt()} | {:error, VintageNet.WiFi.WPA2.invalid_passphrase_error()}
Try to make a WiFiConfiguration from a map.
Required fields:
- "ssid" - The SSID of the access point
- "key_mgmt" - The key management to use
Options fields:
- "password" - The password for the access point
Make a new WiFiConfiguration struct
Link to this function
to_vintage_net_configuration(wi_fi_configuration)
View Sourceto_vintage_net_configuration(t()) :: map() | {:error, VintageNet.WiFi.WPA2.invalid_passphrase_error()} | {:error, :password_required, key_mgmt()}
Take a WiFiConfiguration.t()
and turn into a map that
is used to configure VintageNet
Link to this function
validate_password(wi_fi_configuration)
View Sourcevalidate_password(t()) :: :ok | {:error, VintageNet.WiFi.WPA2.invalid_passphrase_error()} | {:error, :password_required, key_mgmt()}
Validate the password for the WiFiConfiguration