fs

package
v0.0.0-...-80bb616 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package fs provides small abstractions to deal with filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvDescription

type EnvDescription struct {
	Manifests    []string
	KustomizeDir string
	// contains filtered or unexported fields
}

EnvDescription holds key data that describes the Kubernetes environment.

func FindEnv

func FindEnv(folder string) (*EnvDescription, error)

FindEnv walks the folder and locates Kubernetes manifests as an environment description.

func (EnvDescription) InitFolder

func (ed EnvDescription) InitFolder() string

InitFolder returns the name of the init folder, given during configuration of this environment.

func (EnvDescription) IsKustomize

func (ed EnvDescription) IsKustomize() bool

IsKustomize indicates whether this environment has kustomization.yaml file.

func (EnvDescription) ManifestsLeft

func (ed EnvDescription) ManifestsLeft() bool

ManifestsLeft indicates whether all manifests were read, judging by internal pointer.

func (*EnvDescription) ReadManifest

func (ed *EnvDescription) ReadManifest() (string, error)

ReadManifest reads one manifest file and returns it. The pointer to the "next" manifest in the list is being stored internally.

Jump to

Keyboard shortcuts

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