package localizer
import "sigs.k8s.io/kustomize/api/internal/localizer"
Package localizer contains utilities for the command kustomize localize, which is documented under proposals/localize-command or at https://github.com/kubernetes-sigs/kustomize/blob/master/proposals/22-04-localize-command.md
Index ¶
- Constants
- func NewLoader(rawTarget string, rawScope string, rawNewDir string, fSys filesys.FileSystem) (*Loader, Args, error)
- func Run(target, scope, newDir string, fSys filesys.FileSystem) (string, error)
- type Args
- type Loader
- func (ll *Loader) Load(path string) ([]byte, error)
- func (ll *Loader) New(path string) (ifc.Loader, error)
- type PathLocalizeError
- type ResourceLoadError
Constants ¶
const ( // DstPrefix prefixes the target and ref, if target is remote, in the default localize destination directory name DstPrefix = "localized" // LocalizeDir is the name of the localize directories used to store remote content in the localize destination LocalizeDir = "localized-files" // FileSchemeDir is the name of the directory immediately inside LocalizeDir used to store file-schemed repos FileSchemeDir = "file-schemed" )
Functions ¶
func NewLoader ¶
func NewLoader(rawTarget string, rawScope string, rawNewDir string, fSys filesys.FileSystem) (*Loader, Args, error)
NewLoader is the factory method for Loader, under localize constraints, at rawTarget. For invalid localize arguments, NewLoader returns an error.
func Run ¶
func Run(target, scope, newDir string, fSys filesys.FileSystem) (string, error)
Run attempts to localize the kustomization root at target with the given localize arguments and returns the path to the created newDir.
Types ¶
type Args ¶
type Args struct { // target; local copy if remote Target filesys.ConfirmedDir // directory that bounds target's local references // repo directory of local copy if target is remote Scope filesys.ConfirmedDir // localize destination NewDir filesys.ConfirmedDir }
Args holds localize arguments
type Loader ¶
type Loader struct { // loader at Loader's current directory ifc.Loader // contains filtered or unexported fields }
Loader is an ifc.Loader that enforces additional constraints specific to kustomize localize.
func (*Loader) Load ¶
Load returns the contents of path if path is a valid localize file. Otherwise, Load returns an error.
func (*Loader) New ¶
New returns a Loader at path if path is a valid localize root. Otherwise, New returns an error.
type PathLocalizeError ¶
func (PathLocalizeError) Error ¶
func (ple PathLocalizeError) Error() string
type ResourceLoadError ¶
func (ResourceLoadError) Error ¶
func (rle ResourceLoadError) Error() string
Source Files ¶
builtinplugins.go doc.go errors.go localizer.go locloader.go util.go
- Version
- v0.20.0 (latest)
- Published
- Jun 28, 2025
- Platform
- linux/amd64
- Imports
- 26 packages
- Last checked
- 18 hours ago –
Tools for package owners.