Documentation ¶
Index ¶
- type Inliner
- func (n *Inliner) InlineAllComponents(ctx context.Context, packs []*bundle.ComponentPackage) ([]*bundle.ComponentPackage, error)
- func (n *Inliner) InlineComponent(ctx context.Context, comp *bundle.ComponentPackage) (*bundle.ComponentPackage, error)
- func (n *Inliner) InlineComponentDataFiles(ctx context.Context, data *core.ComponentData) (*core.ComponentData, error)
- func (n *Inliner) InlineComponentsInData(ctx context.Context, data *core.ComponentData) (*core.ComponentData, error)
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 ¶
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.