supplychain

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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) AddFlags

func (o *Options) AddFlags(cmd *cobra.Command)

AddFlags adds the supplychain flags to a command.

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

func (o *Options) ShouldUseConfig(hasCliCollectors bool) (useConfig bool, notice string)

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).

func (*Options) Validate

func (o *Options) Validate() error

Validate parses the supplychain config file. It must be called before GetSupplyChainConf.

Jump to

Keyboard shortcuts

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