types

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bom

type Bom struct {
	BomFormat    BomFormat    `json:"bomFormat"`
	SpecVersion  string       `json:"specVersion"`
	Version      int          `json:"version"`
	Metadata     *Metadata    `json:"metadata,omitzero"`
	Components   []Component  `json:"components,omitzero"`
	Dependencies []Dependency `json:"dependencies,omitzero"`
}

type BomFormat

type BomFormat string
const (
	BomFormatCycloneDX BomFormat = "CycloneDX"
)

type Component

type Component struct {
	Type               ComponentType       `json:"type"`
	Name               string              `json:"name"`
	Version            string              `json:"version,omitempty"`
	Purl               string              `json:"purl,omitempty"`
	BomRef             string              `json:"bom-ref,omitempty"`
	Hashes             []Hash              `json:"hashes,omitzero"`
	Licenses           []LicenseChoice     `json:"licenses,omitzero"`
	ExternalReferences []ExternalReference `json:"externalReferences,omitzero"`
}

type ComponentType

type ComponentType string
const (
	ComponentTypeLibrary     ComponentType = "library"
	ComponentTypeApplication ComponentType = "application"
	ComponentTypeFramework   ComponentType = "framework"
	ComponentTypeContainer   ComponentType = "container"
)

type Dependency

type Dependency struct {
	Ref       string   `json:"ref"`
	DependsOn []string `json:"dependsOn,omitzero"`
}

type ExternalReference

type ExternalReference struct {
	Type string `json:"type"`
	Url  string `json:"url"`
}

type Hash

type Hash struct {
	Algorithm HashAlgorithm `json:"alg"`
	Content   string        `json:"content"`
}

type HashAlgorithm

type HashAlgorithm string
const (
	HashAlgorithmSHA256 HashAlgorithm = "SHA-256"
	HashAlgorithmSHA512 HashAlgorithm = "SHA-512"
)

type License

type License struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type LicenseChoice

type LicenseChoice struct {
	License *License `json:"license,omitzero"`
}

type Metadata

type Metadata struct {
	Tools     []Tool     `json:"tools,omitzero"`
	Component *Component `json:"component,omitzero"`
}

type Tool

type Tool struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

Jump to

Keyboard shortcuts

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