installers.sysadmintools.restic #
restic
To get started
import freeflowuniverse.herolib.installers.something.restic as restic_installer
heroscript:='
!!restic.configure name:'test'
password: '1234'
port: 7701
!!restic.start name:'test' reset:1
'
restic_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= restic_installer.get()!
//installer.start(reset:true)!
example heroscript
!!restic.configure
homedir: '/home/user/restic'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '0.0.0'
fn build_ #
fn build_(args BuildArgs) !
install restic will return true if it was already installed
fn get #
fn get(args_ ArgsGet) !&Restic
fn install #
fn install(args_ InstallArgs) !
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for restic
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct BuildArgs #
@[params]
struct BuildArgs {
pub mut:
reset bool
bin_push bool = true
}
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 Restic #
@[heap]
struct Restic {
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 (Restic) build #
fn (mut self Restic) build() !
fn (Restic) destroy #
fn (mut self Restic) destroy() !
fn (Restic) install #
fn (mut self Restic) install(args InstallArgs) !
fn (Restic) install_start #
fn (mut self Restic) install_start(args InstallArgs) !
fn (Restic) restart #
fn (mut self Restic) restart() !
fn (Restic) running #
fn (mut self Restic) running() !bool
fn (Restic) start #
fn (mut self Restic) start() !
fn (Restic) stop #
fn (mut self Restic) stop() !