installers.sysadmintools.daguserver #
daguserver
To get started
import freeflowuniverse.herolib.installers.something. daguserver
mut installer:= daguserver.get()!
installer.start()!
example heroscript
!!daguserver.install
homedir: '/home/user/daguserver'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '1.14.3'
const homedir = os.home_dir()
fn delete #
fn delete(args_ ArgsGet) !
fn exists #
fn exists(args_ ArgsGet) !bool
does the config exists?
fn get #
fn get(args_ ArgsGet) !&DaguInstaller
fn heroscript_dumps #
fn heroscript_dumps(obj DaguInstaller) !string
///////////NORMALLY NO NEED TO TOUCH
fn heroscript_loads #
fn heroscript_loads(heroscript string) !DaguInstaller
fn play #
fn play(args_ PlayArgs) !
fn set #
fn set(o DaguInstaller) !
register the config for the future
fn switch #
fn switch(name string)
switch instance to be used for daguserver
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct DaguInstaller #
@[heap]
struct DaguInstaller {
pub mut:
name string = 'default'
dagsdir string ='${os.home_dir()}/.dagu'
configpath string ='${os.home_dir()}/.config/dagu'
username string
password string @[secret]
secret string @[secret]
title string
host string = 'localhost'
port int = 8014
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (DaguInstaller) destroy #
fn (mut self DaguInstaller) destroy() !
fn (DaguInstaller) install #
fn (mut self DaguInstaller) install(args InstallArgs) !
fn (DaguInstaller) install_start #
fn (mut self DaguInstaller) install_start(args InstallArgs) !
fn (DaguInstaller) reload #
fn (mut self DaguInstaller) reload() !
load from disk and make sure is properly intialized
fn (DaguInstaller) restart #
fn (mut self DaguInstaller) restart() !
fn (DaguInstaller) running #
fn (mut self DaguInstaller) running() !bool
fn (DaguInstaller) start #
fn (mut self DaguInstaller) start() !
fn (DaguInstaller) stop #
fn (mut self DaguInstaller) stop() !
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
}