Skip to content

installers.web.bun #

bun

To get started



import freeflowuniverse.herolib.installers.something.bun as bun_installer

heroscript:='
!!bun.configure name:'test'
    password: '1234'
    port: 7701

!!bun.start name:'test' reset:1 
'

bun_installer.play(heroscript=heroscript)!

//or we can call the default and do a start with reset
//mut installer:= bun_installer.get()!
//installer.start(reset:true)!

example heroscript

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

Constants #

const version = '1.2.3'

fn get #

fn get(args_ ArgsGet) !&Bun

fn play #

fn play(args_ PlayArgs) !

fn switch #

fn switch(name string)

switch instance to be used for bun

struct ArgsGet #

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

///////FACTORY

struct Bun #

@[heap]
struct Bun {
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 (Bun) destroy #

fn (mut self Bun) destroy() !

fn (Bun) install #

fn (mut self Bun) install(args InstallArgs) !

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
}