asset

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 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 {
	//Retrieve 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, excluded []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