Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arg ¶
type Arg struct {
Position int `yaml:"position"`
Required bool `yaml:"required"`
Validate string `yaml:"validate,omitempty"`
Flag string `yaml:"flag,omitempty"`
Suffix string `yaml:"suffix,omitempty"` // append user value with this prefix, e.g. "@" for pkg@version
FixedSuffix string `yaml:"fixed_suffix,omitempty"` // always append this suffix, e.g. "@none" for go remove
}
type Command ¶
type Command struct {
Base []string `yaml:"base"`
BaseOverrides map[string][]string `yaml:"base_overrides,omitempty"` // flag name -> replacement base
Args map[string]Arg `yaml:"args,omitempty"`
Flags map[string]Flag `yaml:"flags,omitempty"`
DefaultFlags []string `yaml:"default_flags,omitempty"`
ExitCodes map[int]string `yaml:"exit_codes,omitempty"`
Then []Command `yaml:"then,omitempty"` // commands to run after this one
}
type Definition ¶
type Definition struct {
Name string `yaml:"name"`
Ecosystem string `yaml:"ecosystem"`
Binary string `yaml:"binary"`
Version string `yaml:"version,omitempty"`
Status string `yaml:"status,omitempty"`
MinTested string `yaml:"min_tested,omitempty"`
MaxTested string `yaml:"max_tested,omitempty"`
Detection Detection `yaml:"detection"`
VersionDetection VersionDetection `yaml:"version_detection,omitempty"`
Commands map[string]Command `yaml:"commands"`
Capabilities []string `yaml:"capabilities"`
}
func LoadEmbedded ¶
func LoadEmbedded() ([]*Definition, error)
func LoadFromBytes ¶
func LoadFromBytes(data []byte) (*Definition, error)
type VersionDetection ¶
Click to show internal directories.
Click to hide internal directories.