Documentation
¶
Index ¶
- func ConfigExists() bool
- func ConfigFolderExists() bool
- func FileExists(path string) bool
- func GetCurrentDirectory() string
- func GetDirNmHash() string
- func SetDefaults(cfg *Struct)
- func SetName(cfg *Struct)
- func Write(configs *Struct) error
- type Binds
- type Container
- type Image
- type Installer
- type Operations
- type Podman
- type Struct
- type UserPkgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶
func ConfigExists() bool
Checks whether the config file exists.
Wrapper around config.FileExists()
func ConfigFolderExists ¶
func ConfigFolderExists() bool
Checks whether the config folder exists.
Wrapper around config.FileExists()
func FileExists ¶
Checks if a file/path exists. Returns true if it exists
Wrapper around os.Stat() & os.IsNotExists()
func GetCurrentDirectory ¶
func GetCurrentDirectory() string
Gets the current folder's full path.
Throws a fatal error in case of failure and exists the program.
func GetDirNmHash ¶
func GetDirNmHash() string
Returns a hash string made using the current directory's name.
func SetDefaults ¶
func SetDefaults(cfg *Struct)
Types ¶
type Container ¶
type Container struct { Name string `json:"name"` Args []string `default:"[\"--net=host\"]" json:"arguments"` WorkDir string `default:"/code" json:"work-dir"` Shell string `default:"/bin/sh" json:"shell"` RootUser bool `json:"root-user"` Privileged bool `default:"true" json:"privileged"` Binds Binds `json:"binds"` Ports []string `default:"[]" json:"ports"` Mounts []string `default:"[]" json:"mounts"` }
type Installer ¶
type Installer struct { Operations Operations `json:"operations"` ArgModifier map[string]string `default:"{}" json:"args-modifier"` }
type Operations ¶
type Operations struct { Add string `default:"apk add {args}" json:"add"` // add "{-y}" to auto install on creation on debian Del string `default:"apk del {args}" json:"del"` Upd string `default:"apk update {args}" json:"update"` Dup string `default:"apk upgrade {args}" json:"upgrade"` Srch string `default:"apk search {args}" json:"search"` }
Click to show internal directories.
Click to hide internal directories.