installers.fediverse.dendrite #
to test
curl http://localhost:8008/_matrix/client/versions
https://chat.ourworld.tf/_matrix/client/versions
//replate the domain ofcourse
fn build #
fn build(args BuildArgs) !
install dendrite will return true if it was already installed
fn get #
fn get(name_ string) !Server
fn install #
fn install(args InstallArgs) !
fn new #
fn new(args_ Config) !Server
get the dendrite server
name string = 'default'
path string = '/data/dendrite'
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'
reset bool
path string = '/data/dendrite'
passwd string @[required]
postgresql_name string = 'default'
domain string @[required]
registration_shared_secret string @[required]
recaptcha_public_key string @[required]
recaptcha_private_key string @[required]
recaptcha_bypass_secret string @[required]
}
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}
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 dendrite 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
fn (Server) user_add #
fn (mut server Server) user_add(args UserAddArgs) !
remove all data
struct UserAddArgs #
@[params]
struct UserAddArgs {
pub mut:
name string @[required]
passwd string @[required]
admin bool
}