inline

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inliner

type Inliner struct {
	// Local reader reads from the local filesystem.
	Reader files.FileObjReader
}

Inliner inlines data files by reading them from the local or a remote filesystem.

func NewLocalInliner

func NewLocalInliner(cwd string) *Inliner

NewInliner creates a new inliner. If the data is stored on disk, the cwd should be the relative path to the directory containing the data file on disk.

func (*Inliner) InlineAllComponents

func (n *Inliner) InlineAllComponents(ctx context.Context, packs []*bundle.ComponentPackage) ([]*bundle.ComponentPackage, error)

InlineAllComponents inlines objects into ComponentPackages.

func (*Inliner) InlineComponent

func (n *Inliner) InlineComponent(ctx context.Context, comp *bundle.ComponentPackage) (*bundle.ComponentPackage, error)

InlineComponent reads file-references for component objects. The returned components are copies with the file-references removed.

func (*Inliner) InlineComponentDataFiles

func (n *Inliner) InlineComponentDataFiles(ctx context.Context, data *core.ComponentData) (*core.ComponentData, error)

Inline converts dereferences file-references in for component data files and turns them into components. Thus, the returned data is a copy with the file-references removed.

func (*Inliner) InlineComponentsInData

func (n *Inliner) InlineComponentsInData(ctx context.Context, data *core.ComponentData) (*core.ComponentData, error)

InlineComponentsInData inlines all the components' objects in a ComponentData object.

Jump to

Keyboard shortcuts

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