bom

package
v1.199.2 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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