Documentation ¶
Overview ¶
Package wrapper provides a union type for expressing various different bundle-types.
Index ¶
- type BundleWrapper
- func FromBundle(c *bundle.Bundle) *BundleWrapper
- func FromBundleBuilder(c *bundle.BundleBuilder) *BundleWrapper
- func FromComponent(c *bundle.Component) *BundleWrapper
- func FromComponentBuilder(c *bundle.ComponentBuilder) *BundleWrapper
- func FromRaw(inFmt string, bytes []byte) (*BundleWrapper, error)
- func (bw *BundleWrapper) AllComponents() []*bundle.Component
- func (bw *BundleWrapper) Bundle() *bundle.Bundle
- func (bw *BundleWrapper) BundleBuilder() *bundle.BundleBuilder
- func (bw *BundleWrapper) Component() *bundle.Component
- func (bw *BundleWrapper) ComponentBuilder() *bundle.ComponentBuilder
- func (bw *BundleWrapper) ExportAsObjects(opts options.JSONOptions) ([]*unstructured.Unstructured, error)
- func (bw *BundleWrapper) Kind() string
- func (bw *BundleWrapper) Object() interface{}
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.