installers.sysadmintools.rclone #
rclone
To get started
import incubaid.herolib.installers.something. rclone
mut installer:= rclone.get()!
installer.start()!
example 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 delete #
fn delete(args ArgsGet) !
fn exists #
fn exists(args ArgsGet) !bool
does the config exists?
fn get #
fn get(args ArgsGet) !&RClone
fn heroscript_dumps #
fn heroscript_dumps(obj RClone) !string
///////////NORMALLY NO NEED TO TOUCH
fn heroscript_loads #
fn heroscript_loads(heroscript string) !RClone
fn list #
fn list(args ArgsList) ![]&RClone
if fromdb set: load from filesystem, and not from mem, will also reset what is in mem
fn new #
fn new(args ArgsGet) !&RClone
fn play #
fn play(mut plbook PlayBook) !
fn set #
fn set(o RClone) !
register the config for the future
fn switch #
fn switch(name string)
switch instance to be used for rclone
enum RCloneCat #
enum RCloneCat {
b2
s3
ftp
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string = 'default'
fromdb bool // will load from filesystem
create bool // default will not create if not exist
}
///////FACTORY
struct ArgsList #
@[params]
struct ArgsList {
pub mut:
fromdb bool // will load from filesystem
}
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}
struct RClone #
@[heap]
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
}
fn (RClone) destroy #
fn (mut self RClone) destroy() !
fn (RClone) install #
fn (mut self RClone) install(args InstallArgs) !
fn (RClone) reload #
fn (mut self RClone) reload() !
load from disk and make sure is properly intialized