catalog

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package catalog lists what a project has, as typed resources: core kinds from rig.yaml and kinds plugins add, such as terraform.stack.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

func Build

func Build(p *spec.Project) *Catalog

Build is the catalog of p's own resources.

func New

func New() *Catalog

func (*Catalog) Add

func (c *Catalog) Add(r Resource)

Add puts r in the catalog, over any resource of the same kind and name.

func (*Catalog) Get

func (c *Catalog) Get(kind, name string) (Resource, bool)

func (*Catalog) Kinds

func (c *Catalog) Kinds() map[string]int

Kinds is every kind in the catalog with how many resources it has.

func (*Catalog) List

func (c *Catalog) List(kind string) []Resource

List is the resources of kind, or of every kind for "", sorted by kind and name.

type Resource

type Resource struct {
	Kind string
	Name string
	Spec any
	// Links are refs this resource points at, such as the services it depends on.
	Links  []string
	Origin config.Origin
}

func (Resource) ID

func (r Resource) ID() string

func (Resource) Ref

func (r Resource) Ref() string

Ref is the resource's own ref, for the kinds core owns a scheme for.

func (Resource) String

func (r Resource) String() string

Jump to

Keyboard shortcuts

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