pipeline

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, input *bundlev1.Bundle, opts ...Option) (*bundlev1.Bundle, error)

Apply a pipeline process to the given bundle.

func Run

func Run(ctx context.Context, opts ...Option) error

Run a processor.

Types

type ChainProcessorFunc

type ChainProcessorFunc func(Context, *bundlev1.SecretChain) error

ChainProcessorFunc describes a secret chain object processor contract.

type Context

type Context interface {
	GetFile() *bundlev1.Bundle
	GetPackage() *bundlev1.Package
	GetSecret() *bundlev1.SecretChain
	GetKeyValue() *bundlev1.KV
}

Context defines tree processing context.

type FileProcessorFunc

type FileProcessorFunc func(Context, *bundlev1.Bundle) error

FileProcessorFunc describes a file object processor contract.

type KVProcessorFunc

type KVProcessorFunc func(Context, *bundlev1.KV) error

KVProcessorFunc describes a kv object processor contract.

type Option

type Option func(*Options)

Option represents option function.

func ChainProcessor

func ChainProcessor(f ChainProcessorFunc) Option

ChainProcessor assign the chain object processor.

func FileProcessor

func FileProcessor(f FileProcessorFunc) Option

FileProcessor assign the file object processor.

func InputReader

func InputReader(value io.Reader) Option

InputReader defines the input reader used to retrieve the bundle content.

func KVProcessor

func KVProcessor(f KVProcessorFunc) Option

KVProcessor assign the KV object processor.

func OutputDisabled

func OutputDisabled() Option

OutputDisabled assign the value to disableOutput option.

func OutputWriter

func OutputWriter(value io.Writer) Option

OutputWriter defines where the bundle will be written after process execution.

func PackageProcessor

func PackageProcessor(f PackageProcessorFunc) Option

PackageProcessor assign the package object processor.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options defines default options.

type PackageProcessorFunc

type PackageProcessorFunc func(Context, *bundlev1.Package) error

PackageProcessorFunc describes a package object processor contract.

type Processor

type Processor func(context.Context, *bundlev1.Bundle) error

Processor declares a bundle processor contract.

Jump to

Keyboard shortcuts

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