v3.3.1 Latest Latest

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 17 Imported by: 8



Package loader has a data loading interface and various implementations.



View Source
const CWD = "."


This section is empty.


func AddFlagLoadRestrictor

func AddFlagLoadRestrictor(set *pflag.FlagSet)

func NewFileLoaderAtCwd

func NewFileLoaderAtCwd(v ifc.Validator, fSys fs.FileSystem) *fileLoader

NewFileLoaderAtCwd returns a loader that loads from ".". A convenience for kustomize edit commands.

func NewFileLoaderAtRoot

func NewFileLoaderAtRoot(v ifc.Validator, fSys fs.FileSystem) *fileLoader

NewFileLoaderAtRoot returns a loader that loads from "/". A convenience for tests.

func NewLoader

func NewLoader(
	lr LoadRestrictorFunc,
	v ifc.Validator,
	target string, fSys fs.FileSystem) (ifc.Loader, error)

NewLoader returns a Loader pointed at the given target. If the target is remote, the loader will be restricted to the root and below only. If the target is local, the loader will have the restrictions passed in. Regardless, if a local target attempts to transitively load remote bases, the remote bases will all be root-only restricted.

func RestrictionNone

func RestrictionNone(
	_ fs.FileSystem, _ fs.ConfirmedDir, path string) (string, error)

func RestrictionRootOnly

func RestrictionRootOnly(
	fSys fs.FileSystem, root fs.ConfirmedDir, path string) (string, error)


type LoadRestrictorFunc

type LoadRestrictorFunc func(
	fs.FileSystem, fs.ConfirmedDir, string) (string, error)

func ValidateFlagLoadRestrictor

func ValidateFlagLoadRestrictor() (LoadRestrictorFunc, error)

Jump to

Keyboard shortcuts

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