class

Wgctl::Models::Metadata

Inherits JSON::Serializable < Reference < Object

Constructors

new(name : String | Nil = nil, description : String | Nil = nil, device : String | Nil = nil, client_private_key : String | Nil = nil, extra : Hash(String, String) = Hash(String, String).new)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

parse_line(line : String, metadata : Metadata) : Bool
Source

Instance methods

client_private_key
Source
client_private_key=(client_private_key : String | Nil)
Source
description
Source
description=(description : String | Nil)
Source
device
Source
device=(device : String | Nil)
Source
empty?
Source
extra
Source
extra=(extra : Hash(String, String))
Source
name
Source
name=(name : String | Nil)
Source
to_comments

Serializes metadata into WireGuard comment lines Example:

wgctl:name=asteri-c

wgctl:description=Contabo Germany

wgctl:device=server

Source