asset

package
v0.15.5-dev Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	// Assets returns a map of named assets or archives, for collections.
	Assets() map[string]interface{}
	// Path returns the filesystem path, for file-based archives.
	Path() string
	// URI returns a URI, for remote network-based archives.
	URI() string
}

Archive represents a collection of Assets.

func NewAssetArchive

func NewAssetArchive(assets map[string]interface{}) Archive

NewAssetArchive creates a new archive from an in-memory collection of named assets or other archives.

func NewFileArchive

func NewFileArchive(path string) Archive

NewFileArchive creates an archive backed by a file and specified by that file's path.

func NewRemoteArchive

func NewRemoteArchive(uri string) Archive

NewRemoteArchive creates an archive backed by a remote file and specified by that file's URL.

type Asset

type Asset interface {
	// Path returns the filesystem path, for file-based assets.
	Path() string
	// Text returns an in-memory blob of text, for string-based assets.
	Text() string
	// URI returns a URI, for remote network-based assets.
	URI() string
}

Asset represents a file that is managed in conjunction with Pulumi resources. An Asset may be backed by a number of sources, including local filesystem paths, in-memory blobs of text, or remote files referenced by a URL.

func NewFileAsset

func NewFileAsset(path string) Asset

NewFileAsset creates an asset backed by a file and specified by that file's path.

func NewRemoteAsset

func NewRemoteAsset(uri string) Asset

NewRemoteAsset creates an asset backed by a remote file and specified by that file's URL.

func NewStringAsset

func NewStringAsset(text string) Asset

NewStringAsset creates an asset backed by a piece of in-memory text.

Jump to

Keyboard shortcuts

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