installers.net.wireguard_installer #
wireguard
To get started
import freeflowuniverse.herolib.installers.something.wireguard as wireguard_installer
heroscript:='
!!wireguard.configure name:'test'
password: '1234'
port: 7701
!!wireguard.start name:'test' reset:1
'
wireguard_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= wireguard_installer.get()!
//installer.start(reset:true)!
example heroscript
!!wireguard.configure
homedir: '/home/user/wireguard'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '1.14.3'
fn get #
fn get(args_ ArgsGet) !&WireGuard
fn heroscript_dumps #
fn heroscript_dumps(obj WireGuard) !string
///////////NORMALLY NO NEED TO TOUCH
fn heroscript_loads #
fn heroscript_loads(heroscript string) !WireGuard
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for wireguard_installer
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct DefaultConfigArgs #
@[params]
struct DefaultConfigArgs {
instance string = 'default'
}
helpers
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}
struct PlayArgs #
@[params]
struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
struct WireGuard #
@[heap]
struct WireGuard {
pub mut:
name string = 'default'
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (WireGuard) destroy #
fn (mut self WireGuard) destroy() !
fn (WireGuard) install #
fn (mut self WireGuard) install(args InstallArgs) !