config

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Overview

Package config provides the frizbee configuration.

Index

Constants

This section is empty.

Variables

View Source
var ContextConfigKey = contextConfigKey{}

ContextConfigKey is the context key for the configuration. nolint:gochecknoglobals // this is a context key

View Source
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 {
	GHActions GHActions `yaml:"ghactions" mapstructure:"ghactions"`
}

Config is the frizbee configuration.

func FromContext

func FromContext(ctx context.Context) (*Config, error)

FromContext returns the configuration from the context.

func ParseConfigFile

func ParseConfigFile(configfile string) (*Config, error)

ParseConfigFile parses a configuration file.

func ParseConfigFileFromFS added in v0.0.11

func ParseConfigFileFromFS(fs billy.Filesystem, configfile string) (*Config, error)

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"`
}

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.

Jump to

Keyboard shortcuts

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