reader

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorFileName = "operator.yaml"
	ParamsFileName   = "params.yaml"

	APIVersion = "kudo.dev/v1beta1"
)

Variables

This section is empty.

Functions

func ExtractTar added in v0.18.0

func ExtractTar(out afero.Fs, r io.Reader) error

ExtractTar extract a tgz archive into the given filesystem. This is a generic extract method so no package parsing is performed. *Note:* all file paths are prepended by `/` and are extracted into the root of the passed Fs. By default tar strips out the leading slash, but leaves `./` when packing a folder and doesn't add it when packing a file so that depending on how it was packed the same file might have a path like `templates/foo.yaml` or `./templates/foo.yaml`. Since we're extracting into the empty MemFs, we can avoid the inconsistency and just extract into the root.

func PackageFilesFromDir added in v0.18.0

func PackageFilesFromDir(fs afero.Fs, packagePath string) (*packages.Files, error)

PackageFilesFromDir walks the path provided and returns package files or an error

func PackageFilesFromTar added in v0.18.0

func PackageFilesFromTar(out afero.Fs, r io.Reader) (*packages.Files, error)

PackageFilesFromTar extracts a tgz archive held by passed reader and returns the package files. Additionally, all the files are saved in the `out` Fs (in the root `/` folder).

func ResourcesFromDir added in v0.18.0

func ResourcesFromDir(fs afero.Fs, path string) (*packages.Resources, error)

ReadPackage creates the implementation of the packages based on the path. The expectation is the packages is always local. The path can be relative or absolute location of the packages.

func ResourcesFromTar added in v0.18.0

func ResourcesFromTar(in afero.Fs, out afero.Fs, path string) (*packages.Resources, error)

ResourcesFromTar extracts files from the tar provides by he `inFs` and the `path` and converts them to resources. All the extracted files are saved in the `outFs` for later use (e.g. searching for local dependencies)

Types

This section is empty.

Jump to

Keyboard shortcuts

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