packagemanifest

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNoVersion if no version # has been provided
	ErrNoVersion = errors.New("version must be set")

	// ErrNoOpName if the operator name has not been set
	ErrNoOpName = genutil.InternalError("operator name must be set")
	// ErrNoOutputDir if the directory to write the package manifest to has not been set
	ErrNoOutputDir = genutil.InternalError("output directory must be set")
)

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Generate(operatorName, version, outputDir string, opts Options) error
}

Generator is an interface that specifies the Generate methods to generate and write various package manifests

func NewGenerator added in v1.4.0

func NewGenerator() Generator

NewGenerator returns a new generator object

type Options added in v1.4.0

type Options struct {
	// BaseDir is a directory to look for an existing base package manifest
	// to update.
	BaseDir string
	// ChannelName is operator's PackageManifest channel. If a new PackageManifest is generated
	// or ChannelName is the only channel in the generated PackageManifest,
	// this channel will be set to the PackageManifest's default.
	ChannelName string
	// IsDefaultChannel determines whether ChannelName should be the default channel in the
	// generated PackageManifest. If true, ChannelName will be the PackageManifest's default channel.
	// Setting this field is only necessary when more than one channel exists.
	IsDefaultChannel bool
}

type PackageManifest added in v1.4.0

type PackageManifest struct {
	PackageName string
	BasePath    string
}

PackageManifest configures the PackageManifest that GetBase() returns.

func (PackageManifest) GetBase added in v1.4.0

func (b PackageManifest) GetBase() (base *apimanifests.PackageManifest, err error)

GetBase returns a base PackageManifest, populated either with default values or, if b.BasePath is set, bytes from disk.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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