Documentation ¶
Index ¶
- Constants
- func ExtractTar(out afero.Fs, r io.Reader) error
- func PackageFilesFromDir(fs afero.Fs, packagePath string) (*packages.Files, error)
- func PackageFilesFromTar(out afero.Fs, r io.Reader) (*packages.Files, error)
- func ResourcesFromDir(fs afero.Fs, path string) (*packages.Resources, error)
- func ResourcesFromTar(in afero.Fs, out afero.Fs, path string) (*packages.Resources, error)
Constants ¶
const ( OperatorFileName = "operator.yaml" ParamsFileName = "params.yaml" APIVersion = "kudo.dev/v1beta1" )
Variables ¶
This section is empty.
Functions ¶
func ExtractTar ¶ added in v0.18.0
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
PackageFilesFromDir walks the path provided and returns package files or an error
func PackageFilesFromTar ¶ added in v0.18.0
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
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
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.