Skip to content

installers.fediverse.peertube #

PeerTube

fn build #

fn build(args BuildArgs) !

install peertube will return true if it was already installed

fn install #

fn install(args InstallArgs) !

fn new #

fn new(args_ Config) !Peertube

fn server_get #

fn server_get(name_ string) !Server

fn server_new #

fn server_new(myconfig_ Config) !Server

get the server of type peertube

 name        string = 'default'
 path        string = '/data/peertube'
 passwd      string

if name exists already in the config DB, it will load for that name

struct BuildArgs #

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

struct Config #

@[params]
struct Config {
pub mut:
	name   string = 'default'
	dest   string = '/data/peertube'
	passwd string
	reset  bool

	mailclient_name string = 'default'

	postgresql_name string = 'default'
}

struct InstallArgs #

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

struct Peertube #

struct Peertube {
pub mut:
	name   string
	config Config
}

fn (Peertube) configure #

fn (mut self Peertube) configure(mut args Config) !

struct Server #

struct Server {
pub mut:
	name        string
	config      Config
	process     ?zinit.ZProcess
	path_config pathlib.Path
}

fn (Server) status #

fn (mut server Server) status() zinit.ZProcessStatus

return status

pub enum ZProcessStatus {
    unknown
    init
    ok
    error
    blocked
    spawned
}

fn (Server) start #

fn (mut server Server) start() !

run peertube as docker compose

fn (Server) restart #

fn (mut server Server) restart() !

fn (Server) stop #

fn (mut server Server) stop() !

fn (Server) check #

fn (mut server Server) check() !

check health, return true if ok

fn (Server) ok #

fn (mut server Server) ok() bool

check health, return true if ok

fn (Server) destroy #

fn (mut server Server) destroy() !

remove all data