asset

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScenarioReader

type ScenarioReader interface {
	//Retreive an asset from the data source
	Asset(templatePath string) ([]byte, error)
	//List all available assets in the data source
	AssetNames(excluded []string) ([]string, error)
	ExtractAssets(prefix, dir string, excluded []string) error
	ToJSON(b []byte) ([]byte, error)
}

type ScenarioResourcesReader

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

func NewScenarioResourcesReader

func NewScenarioResourcesReader(files *embed.FS) *ScenarioResourcesReader

func (*ScenarioResourcesReader) Asset

func (r *ScenarioResourcesReader) Asset(name string) ([]byte, error)

func (*ScenarioResourcesReader) AssetNames

func (r *ScenarioResourcesReader) AssetNames(excluded []string) ([]string, error)

func (*ScenarioResourcesReader) ExtractAssets

func (r *ScenarioResourcesReader) ExtractAssets(prefix, dir string, exclusded []string) error

func (*ScenarioResourcesReader) ToJSON

func (r *ScenarioResourcesReader) ToJSON(b []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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