installers.virt.podman #
Podman
Podman is a lightweight container manager that allows users to manage and run containers without requiring a daemon, providing flexibility and security for containerized applications.
Using Podman in VLang
The following example demonstrates how to use the Podman installer in a VLang script. It checks if Podman is installed, removes it if found, or installs it if not.
Example Code (VLang)
import freeflowuniverse.herolib.installers.virt.podman as podman_installer
mut podman := podman_installer.get()!
// To install
podman.install()!
// To remove
podman.destroy()!
Constants #
const version = '4.9.3'
fn get #
fn get(args_ ArgsGet) !&PodmanInstaller
fn heroscript_dumps #
fn heroscript_dumps(obj PodmanInstaller) !string
///////////NORMALLY NO NEED TO TOUCH
fn heroscript_loads #
fn heroscript_loads(heroscript string) !PodmanInstaller
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for podman
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
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
}
struct PodmanInstaller #
@[heap]
struct PodmanInstaller {
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 (PodmanInstaller) destroy #
fn (mut self PodmanInstaller) destroy() !
fn (PodmanInstaller) install #
fn (mut self PodmanInstaller) install(args InstallArgs) !