wrapper

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package wrapper provides a union type for expressing various different bundle-types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleWrapper

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

BundleWrapper represents one of several possible bundle types -- a union type.

func FromBundle

func FromBundle(c *bundle.Bundle) *BundleWrapper

FromBundle creates a BundleWrapper from a bundle object.

func FromBundleBuilder

func FromBundleBuilder(c *bundle.BundleBuilder) *BundleWrapper

FromBundleBuilder creates a BundleWrapper from a bundle builder object.

func FromComponent

func FromComponent(c *bundle.Component) *BundleWrapper

FromComponent creates a BundleWrapper from a component object

func FromComponentBuilder

func FromComponentBuilder(c *bundle.ComponentBuilder) *BundleWrapper

FromComponentBuilder creates a BundleWrapper from a component builder object

func FromRaw

func FromRaw(inFmt string, bytes []byte) (*BundleWrapper, error)

FromRaw creates a BundleWrapper object from a byte source, by converting based off of the Kind.

func (*BundleWrapper) AllComponents

func (bw *BundleWrapper) AllComponents() []*bundle.Component

AllComponents returns all the components in the BundleWrapper, with the assumption that only one of Bundle or Component is filled out.

func (*BundleWrapper) Bundle

func (bw *BundleWrapper) Bundle() *bundle.Bundle

Bundle returns the wrapped bundle object.

func (*BundleWrapper) BundleBuilder

func (bw *BundleWrapper) BundleBuilder() *bundle.BundleBuilder

BundleBuilder returns the wrapped BundleBuilder object.

func (*BundleWrapper) Component

func (bw *BundleWrapper) Component() *bundle.Component

Component returns the wrapped Component object.

func (*BundleWrapper) ComponentBuilder

func (bw *BundleWrapper) ComponentBuilder() *bundle.ComponentBuilder

ComponentBuilder returns the wrapped ComponentBuilder object.

func (*BundleWrapper) ExportAsObjects added in v0.9.1

func (bw *BundleWrapper) ExportAsObjects(opts options.JSONOptions) ([]*unstructured.Unstructured, error)

ExportAsObjects will export a Bundle as a ComponentSet and Components, or a Component as unstructured Objects.

func (*BundleWrapper) Kind

func (bw *BundleWrapper) Kind() string

Kind gets the type of the underlying object.

func (*BundleWrapper) Object

func (bw *BundleWrapper) Object() interface{}

Object returns the wrapped object.

Jump to

Keyboard shortcuts

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