bom

package
v1.204.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentConfig

type ComponentConfig struct {
	ContainerImages map[string]string  `json:"containerImages,omitempty"`
	Files           map[string]FileRef `json:"files,omitempty"`
}

ComponentConfig represents a component in the BOM.

type Config

type Config struct {
	Components map[string]ComponentConfig `json:"components"`
	Migrations MigrationsConfig           `json:"migrations"`
}

Config represents the Bill of Materials configuration.

func Parse

func Parse(filePath string) (*Config, error)

Parse reads and parses a BOM JSON file.

func (*Config) GetCodesphereContainerImages

func (b *Config) GetCodesphereContainerImages() (map[string]string, error)

GetCodesphereContainerImages returns all container images from the codesphere component.

func (*Config) GetPCApps

func (b *Config) GetPCApps() (reference.Tagged, bool)

GetPCApps returns the pc-applications chart version from the BOM by parsing the tag out of the OCI image reference stored at components["pc-applications"].files["chart"].ociRef. Returns (nil, false) when the component is absent, the chart file entry is missing, or the ociRef has no recognisable tag.

type DbMigrationConfig

type DbMigrationConfig struct {
	Path string `json:"path"`
	From string `json:"from"`
}

DbMigrationConfig represents database migration configuration.

type FileRef

type FileRef struct {
	SrcPath    string   `json:"srcPath,omitempty"`
	SrcUrl     string   `json:"srcUrl,omitempty"`
	Executable bool     `json:"executable,omitempty"`
	Glob       *GlobRef `json:"glob,omitempty"`
	// OciRef is an OCI image reference for a Helm chart, e.g. ghcr.io/org/charts/my-chart:1.0.0
	OciRef string `json:"ociRef,omitempty"`
}

FileRef represents a file reference in the BOM.

type GlobRef

type GlobRef struct {
	Cwd     string   `json:"cwd"`
	Include string   `json:"include"`
	Exclude []string `json:"exclude,omitempty"`
}

GlobRef represents a glob-based file reference.

type MigrationsConfig

type MigrationsConfig struct {
	Db DbMigrationConfig `json:"db"`
}

MigrationsConfig represents the migrations configuration.

Jump to

Keyboard shortcuts

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