Files
herolib/lib/installers/virt/youki/youki_model.v
Mahmoud-Emad ecdc8f4a2a feat: Add heroscript serialization/deserialization functions
- Add heroscript_dumps and heroscript_loads functions
- Replace paramsparser with encoderhero import
- Add ulist_get and upload functions to docker installer
- Add ulist_get and upload functions to zola installer
2025-10-13 22:25:18 +03:00

36 lines
827 B
V

module youki
import incubaid.herolib.data.encoderhero
pub const version = '1.14.3'
const singleton = true
const default = true
// THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
pub struct YoukiInstaller {
pub mut:
name string = 'default'
}
fn obj_init(obj_ YoukiInstaller) !YoukiInstaller {
// never call get here, only thing we can do here is work on object itself
mut obj := obj_
return obj
}
// called before start if done
fn configure() ! {
// mut installer := get()!
}
/////////////NORMALLY NO NEED TO TOUCH
pub fn heroscript_dumps(obj YoukiInstaller) !string {
return encoderhero.encode[YoukiInstaller](obj)!
}
pub fn heroscript_loads(heroscript string) !YoukiInstaller {
mut obj := encoderhero.decode[YoukiInstaller](heroscript)!
return obj
}