Skip to content

installers.sysadmintools.daguserver #

daguserver

heroscript

!!daguserver.install
    homedir: '{HOME}/hero/var/dagu'
    configpath: '{HOME}/.config/dagu/admin.yaml'
    username: 'admin'
    password: 'secretpassword'
    secret: ''
    title: 'My Hero DAG'
    host: 'localhost'
    port: 8888

Constants #

const version = '1.14.3'

fn get #

fn get(args_ ArgsGet) !&DaguServer

fn play #

fn play(args_ InstallPlayArgs) !

fn switch #

fn switch(name string)

switch instance to be used for daguserver

struct ArgsGet #

@[params]
struct ArgsGet {
pub mut:
	name string = 'default'
}

///////FACTORY

struct DaguCommunicationConfig #

@[params]
struct DaguCommunicationConfig {
pub:
	log_dir                string // directory path to save logs from standard output
	history_retention_days int    // history retention days (default: 30)
	mail_on                MailOn // Email notification settings
	smtp                   SMTP   // SMTP server settings
	error_mail             Mail   // Error mail configuration
	info_mail              Mail   // Info mail configuration
}

struct DaguServer #

struct DaguServer {
pub mut:
	name       string = 'default'
	homedir    string
	configpath string
	username   string
	password   string @[secret]
	secret     string @[secret]
	title      string
	host       string
	port       int
}

fn (DaguServer) comms_configure #

fn (mut self DaguServer) comms_configure(config DaguCommunicationConfig) !

fn (DaguServer) destroy #

fn (mut self DaguServer) destroy() !

fn (DaguServer) install #

fn (mut self DaguServer) install(args RestartArgs) !

fn (DaguServer) install_start #

fn (mut self DaguServer) install_start(args RestartArgs) !

fn (DaguServer) reload #

fn (mut self DaguServer) reload() !

load from disk and make sure is properly intialized

fn (DaguServer) restart #

fn (mut self DaguServer) restart() !

fn (DaguServer) running #

fn (mut self DaguServer) running() !bool

fn (DaguServer) start #

fn (mut self DaguServer) start() !

fn (DaguServer) stop #

fn (mut self DaguServer) stop() !

struct InstallPlayArgs #

@[params]
struct InstallPlayArgs {
pub mut:
	name       string = 'default'
	heroscript string // if filled in then plbook will be made out of it
	plbook     ?playbook.PlayBook
	reset      bool
	start      bool
	stop       bool
	restart    bool
	delete     bool
	configure  bool // make sure there is at least one installed
}

struct Mail #

struct Mail {
pub:
	from   string
	to     string
	prefix string
}

struct MailOn #

struct MailOn {
pub:
	failure bool
	success bool
}

struct RestartArgs #

@[params]
struct RestartArgs {
pub mut:
	reset bool
}

struct SMTP #

struct SMTP {
pub:
	host       string
	port       string
	username   string
	password   string
	error_mail Mail
}