config

package
v0.0.0-...-6c13684 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFile string = "config.yml"

Functions

This section is empty.

Types

type Config

type Config struct {
	Plugins      []string         `yaml:"plugins"`
	DockerAPI    string           `yaml:"dockerapi"`
	General      GeneralConf      `yaml:"general"`
	Restrictions RestrictionsConf `yaml:"restrictions"`
}

Config is the struct that holds all the restriction and general configurations

func LoadConfig

func LoadConfig() Config

LoadConfig loads all the config from a yaml file and returns a Config object

type GeneralConf

type GeneralConf struct {
	SecurityOptions       []string `yaml:"secopts,omitempty"`
	DropLinuxCapabilities []string `yaml:"capdrop,omitempty"`
	AddLinuxCapabilities  []string `yaml:"capadd,omitempty"`
	Memory                string   `yaml:"memory,omitempty"`
	CPU                   string   `yaml:"cpu,omitempty"`
	Environment           []string `yaml:"environment,omitempty"`
	User                  string   `yaml:"user,omitempty"`
}

type RestrictionsConf

type RestrictionsConf struct {
	Ports            []string `yaml:"ports"`
	Mounts           []string `yaml:"mounts"`
	Users            []string `yaml:"users"`
	Environment      []string `yaml:"environment"`
	SecurityPolicies []string `yaml:"securitypolicies"`
	Images           []string `yaml:"images"`
	Privileged       bool     `yaml:"privileged"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL