Skip to content

installers.sysadmintools.rclone #

rclone

heroscript

!!rclone.install
    homedir: '/home/user/rclone'
    username: 'admin'
    password: 'secretpassword'
    title: 'Some Title'
    host: 'localhost'
    port: 8888

Constants #

const version = '1.67.0'

fn get #

fn get(args_ ArgsGet) !&RClone

fn play #

fn play(args_ InstallPlayArgs) !

fn switch #

fn switch(name string)

switch instance to be used for rclone

enum RCloneCat #

enum RCloneCat {
	b2
	s3
	ftp
}

struct ArgsGet #

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

///////FACTORY

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 RClone #

struct RClone {
pub mut:
	name        string = 'default'
	cat         RCloneCat
	s3_account  string
	s3_key      string
	s3_secret   string
	hard_delete bool // hard delete a file when delete on server, not just hide
	endpoint    string
}

THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED

fn (RClone) destroy #

fn (mut self RClone) destroy() !

fn (RClone) install #

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

struct RestartArgs #

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