catalog

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Environments []*v1alpha1.Environment
	Releases     *cross.ReleaseList
	Projects     []*v1alpha1.Project
	Files        []*yml.File
}

func Load

func Load(opts LoadOpts) (*Catalog, error)

func (*Catalog) GetFilesByKind

func (c *Catalog) GetFilesByKind(kind string) []*yml.File

GetFilesByKind returns all files of the given kind.

func (*Catalog) ResolveRefs

func (c *Catalog) ResolveRefs() error

type LoadOpts

type LoadOpts struct {
	// Dir is the directory to load catalog from.
	Dir string

	// LoadEnvs controls whether to load environments.
	LoadEnvs bool

	// EnvNames is the list of environment names to load.
	EnvNames []string

	// SortByOrder controls whether environments should be sorted by their spec.order property.
	SortEnvsByOrder bool

	// LoadReleases controls whether to load releases.
	LoadReleases bool

	// ReleaseFilter allows to specify which releases to load.
	// Optional, defaults to loading all releases.
	ReleaseFilter filtering.Filter

	// LoadProjects controls whether to load projects.
	LoadProjects bool

	// ResolveRefs controls whether to resolve references to related resources. Requires that all referenced resources
	// are loaded in the catalog.
	//
	// For example, if ResolveRefs, LoadReleases and LoadEnvs are all enabled, the release.Environment field will be resolved to the
	// actual environment object.
	ResolveRefs bool
}

LoadOpts controls how to load catalog and what to load in it.

Jump to

Keyboard shortcuts

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