Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectVisitor ¶
type ObjectVisitor func(obj ast.FileObject) status.Error
ObjectVisitor is a function that validates a single FileObject at a time.
type Raw ¶
type Raw struct { ClusterName string ReconcilerName string PolicyDir cmpath.Relative Objects []ast.FileObject PreviousCRDs []*v1beta1.CustomResourceDefinition BuildScoper utildiscovery.BuildScoperFunc Converter *declared.ValueConverter AllowUnknownKinds bool }
Raw contains a collection of FileObjects that have just been parsed from a Git repo for a cluster.
type RawVisitor ¶
type RawVisitor func(r *Raw) status.MultiError
RawVisitor is a function that validates or hydrates Raw objects.
func VisitAllRaw ¶
func VisitAllRaw(visit ObjectVisitor) RawVisitor
VisitAllRaw returns a RawVisitor which will call the given ObjectVisitor on every FileObject in the Raw objects.
type Scoped ¶
type Scoped struct { Cluster []ast.FileObject Namespace []ast.FileObject Unknown []ast.FileObject DefaultNamespace string IsNamespaceReconciler bool }
Scoped contains a collection of FileObjects that are organized based upon if they are cluster-scoped or namespace-scoped.
func (*Scoped) Objects ¶
func (s *Scoped) Objects() []ast.FileObject
Objects returns all FileObjects in the Scoped collection.
type ScopedVisitor ¶
type ScopedVisitor func(s *Scoped) status.MultiError
ScopedVisitor is a function that validates or hydrates Scoped objects.
func VisitClusterScoped ¶
func VisitClusterScoped(validate ObjectVisitor) ScopedVisitor
VisitClusterScoped returns a ScopedVisitor which will call the given ObjectVisitor on all cluster-scoped FileObjects in the Scoped objects.
func VisitNamespaceScoped ¶
func VisitNamespaceScoped(validate ObjectVisitor) ScopedVisitor
VisitNamespaceScoped returns a ScopedVisitor which will call the given ObjectVisitor on all namespace-scoped FileObjects in the Scoped objects.
type Tree ¶
type Tree struct { Repo ast.FileObject HierarchyConfigs []ast.FileObject NamespaceSelectors map[string]ast.FileObject Cluster []ast.FileObject Tree *ast.TreeNode }
Tree contains a collection of FileObjects that are organized based upon the structure of a hierarchical repo. This includes system-level objects like HierarchyConfigs as well as a hierarchical tree of namespaces and namespace- scoped objects.
func BuildTree ¶
func BuildTree(scoped *Scoped) (*Tree, status.MultiError)
BuildTree builds a Tree collection of objects from the given Scoped objects.
func (*Tree) Objects ¶
func (t *Tree) Objects() []ast.FileObject
Objects returns all FileObjects in the Tree collection.
type TreeVisitor ¶
type TreeVisitor func(t *Tree) status.MultiError
TreeVisitor is a function that validates or hydrates Raw objects.