config

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CouldNotParseConfigFileError = &microerror.Error{
	Kind: "CouldNotParseConfigFileError",
	Desc: "The configuration file could not be parsed.",
}
View Source
var CouldNotReadConfigFileError = &microerror.Error{
	Kind: "CouldNotReadConfigFileError",
	Desc: "The configuration file could not be read.",
}

Functions

func IsCouldNotParseConfigFile

func IsCouldNotParseConfigFile(e error) bool

IsCouldNotParseConfigFile asserts CouldNotParseConfigFileError

func IsCouldNotReadConfigFile

func IsCouldNotReadConfigFile(e error) bool

IsCouldNotReadConfigFile asserts CouldNotReadConfigFileError

Types

type CRDItem added in v0.8.0

type CRDItem struct {
	Owners      []string     `yaml:"owner,omitempty"`
	Topics      []string     `yaml:"topics,omitempty"`
	Providers   []string     `yaml:"provider,omitempty"`
	Hidden      bool         `yaml:"hidden,omitempty"`
	Deprecation *Deprecation `yaml:"deprecation,omitempty"`
}

type Deprecation added in v0.8.0

type Deprecation struct {
	Info       string                 `yaml:"info,omitempty"`
	ReplacedBy *DeprecationReplacedBy `yaml:"replaced_by,omitempty"`
}

type DeprecationReplacedBy added in v0.8.0

type DeprecationReplacedBy struct {
	FullName  string `yaml:"full_name"`
	ShortName string `yaml:"short_name"`
}

type FromFile

type FromFile struct {
	SourceRepositories []SourceRepository `yaml:"source_repositories"`
	TemplatePath       string             `yaml:"template_path"`
	OutputPath         string             `yaml:"output_path"`
}

FromFile represent a config file content.

func Read

func Read(path string) (*FromFile, error)

Read reads a config file and returns a struct.

type SourceRepository added in v0.8.0

type SourceRepository struct {
	URL             string             `yaml:"url"`
	Organization    string             `yaml:"organization"`
	ShortName       string             `yaml:"short_name"`
	Metadata        map[string]CRDItem `yaml:"metadata"`
	CommitReference string             `yaml:"commit_reference"`
	AnnotationsPath []string           `yaml:"annotations_paths"`
	CRDPaths        []string           `yaml:"crd_paths"`
	CRPaths         []string           `yaml:"cr_paths"`
}

SourceRepository has details about a source repository to find CRDs in.

Jump to

Keyboard shortcuts

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