Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "systemd"
Variables ¶
View Source
var ManualSystemdExtensions = []string{
"service",
"timer",
"target",
}
Functions ¶
func BuildServices ¶
func BuildServices(reqId string)
func GetServiceStatus ¶
func InitPlugin ¶
func InitPlugin(c *types.PluginConfig) error
Types ¶
type CreateTemplate ¶
type CreateTemplate struct { Name string `yaml:"name"` Service *TemplateYaml `yaml:"service"` RawService *RawService `yaml:"raw_service"` // Only set when service is not the typical yaml file format }
Struct used to create a service
type DeleteTemplate ¶
type DeleteTemplate struct {
Name string `yaml:"name" validate:"required"`
}
Struct used to delete a service
type MetaTarget ¶
type MetaTarget struct { Name string `yaml:"name" validate:"required"` // Name of target file Description string `yaml:"description" validate:"required"` // Directory to place target file }
Defines a target in _meta.yaml:targets
type MetaYAML ¶
type MetaYAML struct {
Targets []MetaTarget `yaml:"targets" validate:"required"` // List of targets to generate
}
Defines metadata which is _meta.yaml
type RawService ¶
type ServiceManage ¶
type ServiceManage struct { Service *TemplateYaml RawService *RawService // Only set when service is not the typical yaml file format Status string ID string }
func GetServiceList ¶
func GetServiceList(getStatus bool) ([]ServiceManage, error)
type TemplateYaml ¶
type TemplateYaml struct { Command string `yaml:"cmd" validate:"required"` // ExecStart in systemd Directory string `yaml:"dir" validate:"required"` // WorkingDirectory in systemd Target string `yaml:"target" validate:"required"` // PartOf in systemd Description string `yaml:"description" validate:"required"` // Description in systemd After string `yaml:"after" validate:"required"` // After in systemd Broken bool `yaml:"broken"` // Does the service even work? User string `yaml:"user"` // User in systemd, defaults to root if unset Group string `yaml:"group"` // Group in systemd, if-else it defaults to root }
Defines a template which is any FILENAME.yaml where FILENAME != _meta
Click to show internal directories.
Click to hide internal directories.