Documentation ¶
Overview ¶
Package bundle exposes Bundle object manipulation functions.
Index ¶
- func Annotate(obj AnnotationOwner, key, value string)
- func AsProtoJSON(w io.Writer, b *bundlev1.Bundle) error
- func Dump(w io.Writer, b *bundlev1.Bundle) error
- func FromContainer(c *containerv1.Container) (*bundlev1.Bundle, error)
- func FromContainerReader(r io.Reader) (*bundlev1.Bundle, error)
- func FromDump(r io.Reader) (*bundlev1.Bundle, error)
- func FromHCL(input *hcl.Config) (*bundlev1.Bundle, error)
- func FromMap(input map[string]KV) (*bundlev1.Bundle, error)
- func FromOpLog(oplog compare.OpLog) (*bundlev1.Bundle, error)
- func FromSecretMap(secretKv KV) ([]*bundlev1.KV, error)
- func JSONSchema() []byte
- func Labelize(obj LabelOwner, key, value string)
- func Lint(r io.Reader) ([]gojsonschema.ResultError, error)
- func Load(r io.Reader) (*bundlev1.Bundle, error)
- func Lock(ctx context.Context, b *bundlev1.Bundle, transformer value.Transformer) error
- func PartialLock(ctx context.Context, b *bundlev1.Bundle, ...) error
- func Paths(b *bundlev1.Bundle) ([]string, error)
- func Read(b *bundlev1.Bundle, secretPath string) (map[string]interface{}, error)
- func SecretReader(b *bundlev1.Bundle) func(path string) (map[string]interface{}, error)
- func ToContainer(b *bundlev1.Bundle) (*containerv1.Container, error)
- func ToContainerWriter(w io.Writer, b *bundlev1.Bundle) error
- func UnLock(ctx context.Context, b *bundlev1.Bundle, transformers []value.Transformer, ...) error
- type AnnotationOwner
- type KV
- type LabelOwner
- type Reader
- type Statistic
- type Visitor
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsProtoJSON ¶
AsProtoJSON export given bundle as a JSON representation.
func FromContainer ¶
func FromContainer(c *containerv1.Container) (*bundlev1.Bundle, error)
FromContainer unwraps a Bundle from a secret container.
func FromContainerReader ¶
FromContainerReader returns a Bundle extracted from a secret container.
func FromSecretMap ¶
FromSecretMap returns the protobuf representation of secretMap.
func Lint ¶
func Lint(r io.Reader) ([]gojsonschema.ResultError, error)
Lint to input reader content with Bundle jsonschema.
func PartialLock ¶
func PartialLock(ctx context.Context, b *bundlev1.Bundle, transformerMap map[string]value.Transformer, skipUnresolved bool) error
PartialLock apply conditional transformer according to applicable annotation on the given package. The annotation is referring to a key alias provided.
func SecretReader ¶
SecretReader is used by template engine to resolve secret from secret container.
func ToContainer ¶
func ToContainer(b *bundlev1.Bundle) (*containerv1.Container, error)
ToContainer wrpas a Bundle as a container object.
func ToContainerWriter ¶
ToContainerWriter returns a Bundle packaged as a secret container.
Types ¶
type AnnotationOwner ¶
AnnotationOwner defines annotations owner contract.
type KV ¶
type KV map[string]interface{}
KV describes map[string]interface{} alias.
func AsMetadataMap ¶
AsMetadataMap exports given bundle metadata as a map.
func AsSecretMap ¶
AsSecretMap returns a KV map from given package.
type LabelOwner ¶
LabelOwner defines label owner contract.
type Statistic ¶
type Statistic struct { PackageCount uint32 CSOCompliantPackageNameCount uint32 SecretCount uint32 }
Statistic hold bundle statistic information.