Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Logging Logging `yaml:"logging"`
Profiles map[string]*Profile `yaml:"profiles"`
// MimeHandler configures mime types and the specific workloads to handle them.
MimeHandlers map[string]MimeHandler `yaml:"mimeHandlers"`
DefaultMimeHandler *MimeHandler `yaml:"defaultMimeHandler"`
// WorkloadPullMode defines how workload images should be pulled.
WorkloadPullMode WorkloadPullMode `yaml:"workloadPullMode"`
}
func LoadConfig ¶
type EffectiveWorkload ¶
type EffectiveWorkload struct {
// Name combines the name of both the workload and the profile
// in which it will be executed under.
Name string
Profile *Profile
Workload Workload
}
func (EffectiveWorkload) Validate ¶
func (w EffectiveWorkload) Validate() error
type HostAccess ¶
type HostAccess struct {
X11 bool `yaml:"x11"`
Camera bool `yaml:"camera"`
Microphone bool `yaml:"microphone"`
Speakers bool `yaml:"speakers"`
Smartcard bool `yaml:"smartcard"`
Network string `yaml:"network"`
VarRunUser bool `yaml:"varRunUser"`
Privileged bool `yaml:"privileged"`
Mime bool `yaml:"mime"`
Bluetooth bool `yaml:"bluetooth"`
// MachineID defines whether the workload should share the same
// machine id as the host.
MachineID bool `yaml:"machineId"`
// LocalTime defines whether the workload should share the same
// local time as the host.
LocalTime bool `yaml:"localTime"`
}
type MimeHandler ¶
type Profile ¶
type Profile struct {
Name string
// Path defines the root path for the given profile. All other
// paths (e.g. Paths) will descend from it.
//
// Note that this Path descends from the dir where the qubesome
// config is being consumed. When sourcing from git, it descends
// from the git repository directory.
Path string
Runner string // TODO: Better name runner
HostAccess `yaml:"hostAccess"`
// TODO: Rename to USB named devices
NamedDevices []string `yaml:"namedDevices"`
Display uint8 `yaml:"display"`
Paths []string `yaml:"paths"`
}
type Workload ¶
type Workload struct {
Name string `yaml:"name"`
Image string `yaml:"image"`
Command string `yaml:"command"`
Args []string `yaml:"args"`
SingleInstance bool `yaml:"singleInstance"`
HostAccess `yaml:"hostAccess"`
Paths []string `yaml:"paths"`
HomePaths []string `yaml:"homePaths"`
Volumes []string `yaml:"volumes"`
MimeApps []string `yaml:"mimeApps"`
// TODO: Rename to USB Named Devices
// grep -R HID_NAME /sys/class/hidraw/*/device/uevent | cut -d'=' -f2
NamedDevices []string `yaml:"namedDevices"`
Runner string `yaml:"runner"`
}
func (Workload) ApplyProfile ¶
func (w Workload) ApplyProfile(p *Profile) EffectiveWorkload
type WorkloadPullMode ¶
type WorkloadPullMode string
const ( // OnDemand is a no-op and won't preemptively pull workload images. // This is the default behaviour. OnDemand WorkloadPullMode = "on-demand" // Background downloads all workload images on the background when // any command is executed. This operation will only take place once // a day. Background WorkloadPullMode = "background" )
Click to show internal directories.
Click to hide internal directories.