Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(path string) (*v1.SupplyChainConfig, error)
Parse reads a supplychain config from the given path. If the file is not found at the exact path, it tries swapping the extension between .yaml and .yml before returning an error.
func ParseReader ¶
func ParseReader(r io.Reader) (*v1.SupplyChainConfig, error)
ParseReader reads a supplychain config from an io.Reader.
Types ¶
type Options ¶
type Options struct {
DotSupplyChain string
ForceDotSupplyChain bool
// contains filtered or unexported fields
}
Options implements command.OptionsSet for the supplychain config file.
func (*Options) Config ¶
func (o *Options) Config() *command.OptionsSetConfig
Config returns the flag configuration for the supplychain options.
func (*Options) GetSupplyChainConf ¶
func (o *Options) GetSupplyChainConf() *v1.SupplyChainConfig
GetSupplyChainConf returns the parsed supply chain configuration. Validate must be called first.
func (*Options) ShouldUseConfig ¶ added in v0.4.2
ShouldUseConfig determines whether the supply chain configuration should be applied given whether collectors were specified on the command line. It returns whether to use the config and an optional notice message to display to the user (empty string means no notice).