filetree

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomResourceDefinition = "CustomResourceDefinition"
	PatchesFolder            = "overlays"
	ResourcesFolder          = "resources"
)

Variables

This section is empty.

Functions

func IsSupported added in v0.32.0

func IsSupported(file []byte) bool

Types

type Loader

type Loader interface {
	LoadTree(root string) (*Node, error)
	// someday this should return an overlay too
	LoadFile(root string, path string) ([]byte, error)
}

A Loader returns a struct representation of a filesystem directory tree

func NewLoader

func NewLoader(
	fs afero.Afero,
	logger log.Logger,
	stateManager state.Manager,
) Loader

NewLoader builds an aferoLoader, used with dig

type Node

type Node struct {
	Children    []Node `json:"children" yaml:"children"`
	Name        string `json:"name" yaml:"name"`
	Path        string `json:"path" yaml:"path"`
	HasOverlay  bool   `json:"hasOverlay" yaml:"hasOverlay"`
	IsSupported bool   `json:"isSupported" yaml:"isSupported"`
	IsExcluded  bool   `json:"isExcluded" yaml:"isExcluded"`
}

Jump to

Keyboard shortcuts

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