unit

package
v0.0.0-...-8f2f122 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHelp = errors.New("flag: help requested")

ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.

View Source
var ErrRetry = errors.New("flag: retry")

ErrRetry is the error returned if you need to try letter by letter

Functions

This section is empty.

Types

type FlagSet

type FlagSet struct {
	// contains filtered or unexported fields
}

func (*FlagSet) Args

func (f *FlagSet) Args() []string

func (*FlagSet) Env

func (f *FlagSet) Env() map[string]string

func (*FlagSet) Out

func (f *FlagSet) Out() io.Writer

Out returns the destination for usage and error messages.

func (*FlagSet) Parse

func (f *FlagSet) Parse(arguments []string) error

Parse parses flag definitions from the argument list, which should not include the command name. Must be called after all flags in the FlagSet are defined and before flags are accessed by the program. The return value will be ErrHelp if -help was set but not defined.

func (*FlagSet) Values

func (f *FlagSet) Values() map[string]string

type Unit

type Unit struct {
	*unit.UnitFile

	RunFlags   map[string]string
	RunImage   string
	RunCommand []string

	Network map[string]string

	Macros map[string]string

	Env map[string]string
}

func NewUnit

func NewUnit(raw string) (*Unit, error)

func (*Unit) FirstValue

func (u *Unit) FirstValue(section, name string) string

func (*Unit) ValidateAll

func (u *Unit) ValidateAll() error

func (*Unit) ValidateExecStart

func (u *Unit) ValidateExecStart() error

func (*Unit) ValidateExecStartPost

func (u *Unit) ValidateExecStartPost() error

func (*Unit) ValidateExecStartPre

func (u *Unit) ValidateExecStartPre() error

func (*Unit) ValidateKeys

func (u *Unit) ValidateKeys() error

Jump to

Keyboard shortcuts

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