models

package
v0.0.0-...-af97bb5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CycloneDxFlavors = struct {
	XML  CycloneDxFlavor
	JSON CycloneDxFlavor
}{
	XML:  "xml",
	JSON: "json",
}

Functions

This section is empty.

Types

type CycloneDxAttachment

type CycloneDxAttachment struct {
	ContentType string `json:"contentType,omitempty"`
	Encoding    string `json:"encoding,omitempty"`
	Content     string `json:"content"`
}

type CycloneDxBom

type CycloneDxBom struct {
	BomFormat          string                       `json:"bomFormat"`
	SpecVersion        string                       `json:"specVersion"`
	SerialNumber       string                       `json:"serialNumber,omitempty"`
	Version            int                          `json:"version"`
	Metadata           CycloneDxMetadata            `json:"metadata,omitempty"`
	Components         []CycloneDxComponent         `json:"components,omitempty"`
	Services           []CycloneDxService           `json:"services,omitempty"`
	ExternalReferences []CycloneDxExternalReference `json:"externalReferences,omitempty"`
	Dependencies       []CycloneDxDependency        `json:"dependencies,omitempty"`
	Compositions       []CycloneDxComposition       `json:"compositions,omitempty"`
}

type CycloneDxBomContainer

type CycloneDxBomContainer struct {
	BomData string
	Flavor  CycloneDxFlavor
	Bom     CycloneDxBom
}

func ParseCycloneDxBom

func ParseCycloneDxBom(path string) CycloneDxBomContainer

type CycloneDxCommit

type CycloneDxCommit struct {
	Uid       string                      `json:"uid,omitempty"`
	Url       string                      `json:"url,omitempty"`
	Author    CycloneDxIdentifiableAction `json:"author,omitempty"`
	Committer CycloneDxIdentifiableAction `json:"committer,omitempty"`
	Message   string                      `json:"message,omitempty"`
}

type CycloneDxComponent

type CycloneDxComponent struct {
	Type               string                        `json:"type"`
	MimeType           string                        `json:"mime-type,omitempty"`
	BomRef             string                        `json:"bom-ref,omitempty"`
	Supplier           CycloneDxOrganizationalEntity `json:"supplier,omitempty"`
	Author             string                        `json:"author,omitempty"`
	Publisher          string                        `json:"publisher,omitempty"`
	Group              string                        `json:"group,omitempty"`
	Name               string                        `json:"name"`
	Version            string                        `json:"version"`
	Description        string                        `json:"description,omitempty"`
	Scope              string                        `json:"scope,omitempty"`
	Hashes             []CycloneDxHash               `json:"hashes,omitempty"`
	Licenses           []CycloneDxLicenseEntry       `json:"licenses,omitempty"`
	Copyright          string                        `json:"copyright,omitempty"`
	Cpe                string                        `json:"cpe,omitempty"`
	Purl               string                        `json:"purl,omitempty"`
	Swid               CycloneDxSwidTag              `json:"swid,omitempty"`
	Modified           bool                          `json:"modified,omitempty"`
	Pedigree           CycloneDxComponentPedigree    `json:"pedigree,omitempty"`
	ExternalReferences []CycloneDxExternalReference  `json:"externalReferences,omitempty"`
	Components         []CycloneDxComponent          `json:"components,omitempty"`
	Evidence           CycloneDxEvidence             `json:"evidence,omitempty"`
	Properties         []CycloneDxNameValuePair      `json:"properties,omitempty"`
}

type CycloneDxComponentPedigree

type CycloneDxComponentPedigree struct {
	Ancestors   []CycloneDxComponent `json:"ancestors,omitempty"`
	Descendants []CycloneDxComponent `json:"descendants,omitempty"`
	Variants    []CycloneDxComponent `json:"variants,omitempty"`
	Commits     []CycloneDxCommit    `json:"commits,omitempty"`
	Patches     []CycloneDxPatch     `json:"patches,omitempty"`
	Notes       string               `json:"notes,omitempty"`
}

type CycloneDxComposition

type CycloneDxComposition struct {
	Aggregate    string                `json:"aggregate"`
	Assemblies   []string              `json:"assemblies,omitempty"`
	Dependencies []CycloneDxDependency `json:"dependencies,omitempty"`
}

type CycloneDxCopyright

type CycloneDxCopyright struct {
	Text string `json:"text,omitempty"`
}

type CycloneDxDependency

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

type CycloneDxDiff

type CycloneDxDiff struct {
	Text CycloneDxAttachment `json:"text,omitempty"`
	Url  string              `json:"string,omitempty"`
}

type CycloneDxEvidence

type CycloneDxEvidence struct {
	Licenses  []CycloneDxLicenseEntry `json:"licenses,omitempty"`
	Copyright []CycloneDxCopyright    `json:"copyright,omitempty"`
}

type CycloneDxExternalReference

type CycloneDxExternalReference struct {
	Url     string        `json:"url"`
	Comment string        `json:"comment,omitempty"`
	Type    string        `json:"type"`
	Hashes  CycloneDxHash `json:"hashes,omitempty"`
}

type CycloneDxFlavor

type CycloneDxFlavor string

golang doesn't provide an enum type so we introduce this struct to loosely emulate it

type CycloneDxHash

type CycloneDxHash struct {
	Alg     string `json:"alg"`
	Content string `json:"content"`
}

type CycloneDxIdentifiableAction

type CycloneDxIdentifiableAction struct {
	Timestamp string `json:"timestamp,omitempty"`
	Name      string `json:"name,omitempty"`
	Email     string `json:"email,omitempty"`
}

type CycloneDxLicense

type CycloneDxLicense struct {
	Id   string              `json:"id,omitempty"`
	Name string              `json:"name,omitempty"`
	Text CycloneDxAttachment `json:"text,omitempty"`
	Url  string              `json:"url,omitempty"`
}

type CycloneDxLicenseEntry

type CycloneDxLicenseEntry struct {
	License    CycloneDxLicense `json:"license,omitempty"`
	Expression string           `json:"expression,omitempty"`
}

type CycloneDxMetadata

type CycloneDxMetadata struct {
	Timestamp   string                           `json:"timestamp,omitempty"`
	Tools       []CycloneDxTools                 `json:"tools,omitempty"`
	Authors     []CycloneDxOrganizationalContact `json:"authors,omitempty"`
	Component   CycloneDxComponent               `json:"component,omitempty"`
	Manufacture CycloneDxOrganizationalEntity    `json:"manufacture,omitempty"`
	Supplier    CycloneDxOrganizationalEntity    `json:"supplier,omitempty"`
	Licenses    []CycloneDxLicenseEntry          `json:"licenses,omitempty"`
	Properties  []CycloneDxNameValuePair         `json:"properties,omitempty"`
}

type CycloneDxNameValuePair

type CycloneDxNameValuePair struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type CycloneDxOrganizationalContact

type CycloneDxOrganizationalContact struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
	Phone string `json:"phone,omitempty"`
}

type CycloneDxOrganizationalEntity

type CycloneDxOrganizationalEntity struct {
	Name    string                           `json:"name,omitempty"`
	Url     []string                         `json:"url,omitempty"`
	Contact []CycloneDxOrganizationalContact `json:"contact,omitempty"`
}

type CycloneDxPatch

type CycloneDxPatch struct {
	Type     string          `json:"type,omitempty"`
	Diff     CycloneDxDiff   `json:"diff,omitempty"`
	Resolves []CycloneDxDiff `json:"resolves,omitempty"`
}

type CycloneDxService

type CycloneDxService struct {
	BomRef             string                        `json:"bom-ref,omitempty"`
	Provider           CycloneDxOrganizationalEntity `json:"provider,omitempty"`
	Group              string                        `json:"group,omitempty"`
	Name               string                        `json:"name"`
	Version            string                        `json:"version,omitempty"`
	Description        string                        `json:"description,omitempty"`
	Endpoints          []string                      `json:"endpoints,omitempty"`
	Authenticated      bool                          `json:"authenticated,omitempty"`
	XTrustBoundary     bool                          `json:"x-trust-boundary,omitempty"`
	Data               []CycloneDxHash               `json:"data,omitempty"`
	Licenses           []CycloneDxLicenseEntry       `json:"licenses,omitempty"`
	ExternalReferences []CycloneDxExternalReference  `json:"externalReferences,omitempty"`
	Services           []CycloneDxService            `json:"services,omitempty"`
	Properties         []CycloneDxNameValuePair      `json:"properties,omitempty"`
}

type CycloneDxSwidTag

type CycloneDxSwidTag struct {
	TagId      string              `json:"tagId,omitempty"`
	Name       string              `json:"name,omitempty"`
	Version    string              `json:"version,omitempty"`
	TagVersion int                 `json:"tagVersion,omitempty"`
	Patch      bool                `json:"patch,omitempty"`
	Text       CycloneDxAttachment `json:"text,omitempty"`
	Url        string              `json:"url,omitempty"`
}

type CycloneDxTools

type CycloneDxTools struct {
	Vendor  string          `json:"vendor,omitempty"`
	Name    string          `json:"name,omitempty"`
	Version string          `json:"version,omitempty"`
	Hashes  []CycloneDxHash `json:"hashes,omitempty"`
}

Jump to

Keyboard shortcuts

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