packagemanifest

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// OperatorName is the operator's name, ex. app-operator.
	OperatorName string
	// Version is the version of the operator being updated.
	Version 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
	// contains filtered or unexported fields
}

func (*Generator) Generate

func (g *Generator) Generate(opts ...Option) error

Generate configures the Generator with opts then runs it.

type Option

type Option func(*Generator) error

Option is a function that modifies a Generator.

func WithBase

func WithBase(inputDir string) Option

WithBase sets a Generator's base PackageManifest to one that either exists or a default.

func WithFileWriter

func WithFileWriter(dir string) Option

WithFileWriter sets a Generator's writer to a PackageManifest file under <dir>.

func WithWriter

func WithWriter(w io.Writer) Option

WithWriter sets a Generator's writer to w.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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