action

package
v2.0.0-...-f0a61fb Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAllowed = errors.New("not allowed")

Functions

This section is empty.

Types

type Diff

type Diff struct {
	Registry image.Registry

	OldRefs []string
	NewRefs []string
	// SkipDependencies directs Run() to not include dependencies
	// of bundles included in the diff if true.
	SkipDependencies bool

	IncludeConfig DiffIncludeConfig
	// IncludeAdditively catalog objects specified in IncludeConfig.
	IncludeAdditively bool

	Logger *logrus.Entry
}

func (Diff) Run

func (diff Diff) Run(ctx context.Context) (*declcfg.DeclarativeConfig, error)

type DiffIncludeChannel

type DiffIncludeChannel struct {
	// Name of channel.
	Name string `json:"name" yaml:"name"`
	// Versions to include.
	Versions []semver.Version `json:"versions,omitempty" yaml:"versions,omitempty"`
	// Bundles are bundle names to include.
	// Set this field only if the named bundle has no semantic version metadata.
	Bundles []string `json:"bundles,omitempty" yaml:"bundles,omitempty"`
}

DiffIncludeChannel contains a name (required) and versions (optional) to include in the diff. The full channel is only included if no versions are specified.

type DiffIncludeConfig

type DiffIncludeConfig struct {
	// Packages to include.
	Packages []DiffIncludePackage `json:"packages" yaml:"packages"`
}

DiffIncludeConfig configures Diff.Run() to include a set of packages, channels, and/or bundles/versions in the output DeclarativeConfig. These override other diff mechanisms. For example, if running in heads-only mode but package "foo" channel "stable" is specified, the entire "stable" channel (all channel bundles) is added to the output.

func LoadDiffIncludeConfig

func LoadDiffIncludeConfig(r io.Reader) (c DiffIncludeConfig, err error)

LoadDiffIncludeConfig loads a (YAML or JSON) DiffIncludeConfig from r.

type DiffIncludePackage

type DiffIncludePackage struct {
	// Name of package.
	Name string `json:"name" yaml:"name"`
	// Channels to include.
	Channels []DiffIncludeChannel `json:"channels,omitempty" yaml:"channels,omitempty"`
	// Versions to include. All channels containing these versions
	// are parsed for an upgrade graph.
	Versions []semver.Version `json:"versions,omitempty" yaml:"versions,omitempty"`
	// Bundles are bundle names to include. All channels containing these bundles
	// are parsed for an upgrade graph.
	// Set this field only if the named bundle has no semantic version metadata.
	Bundles []string `json:"bundles,omitempty" yaml:"bundles,omitempty"`
}

DiffIncludePackage contains a name (required) and channels and/or versions (optional) to include in the diff. The full package is only included if no channels or versions are specified.

type GenerateDockerfile

type GenerateDockerfile struct {
	BaseImage   string
	IndexDir    string
	ExtraLabels map[string]string
	Writer      io.Writer
}

func (GenerateDockerfile) Run

func (i GenerateDockerfile) Run() error

type Init

type Init struct {
	Package           string
	DefaultChannel    string
	DescriptionReader io.Reader
	IconReader        io.Reader
}

func (Init) Run

func (i Init) Run() (*declcfg.Package, error)

type ListBundles

type ListBundles struct {
	IndexReference string
	PackageName    string
}

func (*ListBundles) Run

type ListBundlesResult

type ListBundlesResult struct {
	Bundles []model.Bundle
}

func (*ListBundlesResult) WriteColumns

func (r *ListBundlesResult) WriteColumns(w io.Writer) error

type ListChannels

type ListChannels struct {
	IndexReference string
	PackageName    string
}

func (*ListChannels) Run

type ListChannelsResult

type ListChannelsResult struct {
	Channels []model.Channel
}

func (*ListChannelsResult) WriteColumns

func (r *ListChannelsResult) WriteColumns(w io.Writer) error

type ListPackages

type ListPackages struct {
	IndexReference string
}

func (*ListPackages) Run

type ListPackagesResult

type ListPackagesResult struct {
	Packages []model.Package
}

func (*ListPackagesResult) WriteColumns

func (r *ListPackagesResult) WriteColumns(w io.Writer) error

type Migrate

type Migrate struct {
	CatalogRef string
	OutputDir  string

	WriteFunc WriteFunc
	FileExt   string
	Registry  image.Registry
}

func (Migrate) Run

func (m Migrate) Run(ctx context.Context) error

type RefType

type RefType uint
const (
	RefBundleImage RefType = 1 << iota
	RefSqliteImage
	RefSqliteFile
	RefDCImage
	RefDCDir

	RefAll = 0
)

func (RefType) Allowed

func (r RefType) Allowed(refType RefType) bool

type Render

type Render struct {
	Refs           []string
	Registry       image.Registry
	AllowedRefMask RefType
	// contains filtered or unexported fields
}

func (Render) Run

type WriteFunc

type WriteFunc func(config declcfg.DeclarativeConfig, w io.Writer) error

Jump to

Keyboard shortcuts

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