loader

package
v0.3.3-beta1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleLoader

type BundleLoader interface {
	// Load a bundle from a local file
	Load(source string) (*bundle.Bundle, error)
	// Load a bundle from raw data
	LoadData(data []byte) (*bundle.Bundle, error)
}

BundleLoader provides an interface for loading a bundle

func New

func New() BundleLoader

New creates a loader for bundle files. TODO: remove if unnecessary

type Loader

type Loader struct{}

Loader loads a bundle manifest (bundle.json)

func NewLoader

func NewLoader() *Loader

func (*Loader) Load

func (l *Loader) Load(filename string) (*bundle.Bundle, error)

Load loads the given bundle.

func (*Loader) LoadData

func (l *Loader) LoadData(data []byte) (*bundle.Bundle, error)

LoadData loads a Bundle from the given data.

This loads a JSON bundle file into a *bundle.Bundle.

Jump to

Keyboard shortcuts

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