loader

package
v0.0.0-...-76abfc1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SmartPathFactories map[px.PathType]SmartPathFactory = map[px.PathType]SmartPathFactory{
	px.PuppetDataTypePath: newPuppetTypePath,
}
View Source
var StaticLoader = &basicLoader{namedEntries: make(map[string]px.LoaderEntry, 64)}

Functions

func InstantiatePuppetType

func InstantiatePuppetType(ctx px.Context, loader ContentProvidingLoader, tn px.TypedName, sources []string)

InstantiatePuppetType reads the contents a puppet manifest file and parses it using the types.Parse() function.

Types

type ContentProvidingLoader

type ContentProvidingLoader interface {
	px.Loader

	GetContent(c px.Context, path string) []byte
}

type Instantiator

type Instantiator func(ctx px.Context, loader ContentProvidingLoader, tn px.TypedName, sources []string)

type SmartPath

type SmartPath interface {
	Loader() px.Loader
	GenericPath() string
	EffectivePath(name px.TypedName) string
	Extension() string
	RelativePath() string
	Namespaces() []px.Namespace
	IsMatchMany() bool
	PreferredOrigin(i []string) string
	TypedNames(nameAuthority px.URI, relativePath string) []px.TypedName
	Instantiator() Instantiator
	Indexed() bool
	SetIndexed()
}

func NewSmartPath

func NewSmartPath(relativePath, extension string,
	loader px.ModuleLoader, namespaces []px.Namespace, moduleNameRelative,
	matchMany bool, instantiator Instantiator) SmartPath

type SmartPathFactory

type SmartPathFactory func(loader px.ModuleLoader, moduleNameRelative bool) SmartPath

Jump to

Keyboard shortcuts

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