transformer

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package transformer provides transformations for bundles

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageSubRule

type ImageSubRule struct {
	Find    string
	Replace string
}

ImageSubRule represents string substitutions to preform on images in bundles.

type ImageTransformer

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

ImageTransformer makes modifications to container and node images in Bundles.

func NewImageTransformer added in v0.5.0

func NewImageTransformer(comp []*bundle.Component) *ImageTransformer

NewImageTransformer creates a new ImageTransformer instance.

func (*ImageTransformer) TransformImagesStringSub

func (t *ImageTransformer) TransformImagesStringSub(rules []*ImageSubRule) []*bundle.Component

TransformImagesStringSub transforms container and node images based on string substitution. A cloned bundle is always returned, even if no changes are made.

Rules are applied in order to images. If two rules apply, then they will be applied in order.

Jump to

Keyboard shortcuts

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