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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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