class

Wgctl::Client::Config

Inherits JSON::Serializable < Reference < Object

Constructors

load

Loads existing config or returns new instance if not exists

Source
new(active_profile : String | Nil = nil, profiles : Hash(String, RemoteProfile) = Hash(String, RemoteProfile).new)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

config_path

Path to remote profiles configuration (~/.config/wgctl/remote.json)

Source

Instance methods

active_profile
Source
active_profile=(active_profile : String | Nil)
Source
add_profile(name : String, profile : RemoteProfile, set_active : Bool = true)
Source
current_profile

Returns currently active profile if set

Source
profiles
Source
profiles=(profiles : Hash(String, RemoteProfile))
Source
remove_profile(name : String) : Bool
Source
save

Saves configuration with 0600 permissions

Source