Files
herolib/lib/installers/web/lighttpd/lighttpd_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

38 lines
892 B
V

module lighttpd
import incubaid.herolib.data.encoderhero
pub const version = '0.0.0'
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
@[heap]
pub struct LightHttpdInstaller {
pub mut:
name string = 'default'
}
fn obj_init(obj_ LightHttpdInstaller) !LightHttpdInstaller {
// never call get here, only thing we can do here is work on object itself
mut obj := obj_
panic('implement')
return obj
}
// called before start if done
fn configure() ! {
// mut installer := get()!
}
/////////////NORMALLY NO NEED TO TOUCH
pub fn heroscript_dumps(obj LightHttpdInstaller) !string {
return encoderhero.encode[LightHttpdInstaller](obj)!
}
pub fn heroscript_loads(heroscript string) !LightHttpdInstaller {
mut obj := encoderhero.decode[LightHttpdInstaller](heroscript)!
return obj
}