Documentation ¶
Overview ¶
Package config provides the frizbee configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ContextConfigKey = contextConfigKey{}
ContextConfigKey is the context key for the configuration. nolint:gochecknoglobals // this is a context key
var ( // ErrNoConfigInContext is returned when no configuration is found in the context. ErrNoConfigInContext = errors.New("no configuration found in context") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Platform string `yaml:"platform" mapstructure:"platform"` GHActions GHActions `yaml:"ghactions" mapstructure:"ghactions"` Images Images `yaml:"images" mapstructure:"images"` }
Config is the frizbee configuration.
func DefaultConfig ¶ added in v0.0.20
func DefaultConfig() *Config
DefaultConfig returns the default configuration.
func FromCommand ¶
FromCommand returns the configuration from the cobra command.
func MergeUserConfig ¶ added in v0.0.20
MergeUserConfig merges the user configuration with the default configuration. mostly making sure that we don't try to pin the scratch image
func ParseConfigFile ¶
ParseConfigFile parses a configuration file.
func ParseConfigFileFromFS ¶
ParseConfigFileFromFS parses a configuration file from a filesystem.
type Filter ¶
type Filter struct { // Exclude is a list of patterns to exclude. Exclude []string `yaml:"exclude" mapstructure:"exclude"` ExcludeBranches []string `yaml:"exclude_branches" mapstructure:"exclude_branches"` }
Filter is a common configuration for filtering out patterns.
type GHActions ¶
type GHActions struct {
Filter `yaml:",inline" mapstructure:",inline"`
}
GHActions is the GitHub Actions configuration.
type ImageFilter ¶ added in v0.0.20
type ImageFilter struct { // ExcludeImages is a regex that must match in order for an image to be excluded and not pinned ExcludeImages []string `yaml:"exclude_images" mapstructure:"exclude_images"` ExcludeTags []string `yaml:"exclude_tags" mapstructure:"exclude_tags"` }
ImageFilter is the image filter configuration.
type Images ¶ added in v0.0.20
type Images struct {
ImageFilter `yaml:",inline" mapstructure:",inline"`
}
Images is the image configuration.