model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Name             string `json:"name"`
	Version          string `json:"version"`
	Type             string `json:"type"`
	Checksum         string `json:"checksum"`
	Supplier         string `json:"supplier"`
	Build            *Build `json:"build"`
	PURL             string `json:"purl"`
	LicenseConcluded string `json:"licenseConcluded,omitempty"`
	LicenseDeclared  string `json:"licenseDeclared,omitempty"`
}

type Build

type Build struct {
	OS       string `json:"os"`
	Arch     string `json:"arch"`
	Kernel   string `json:"kernel"`
	Builder  string `json:"builder"`
	Compiler string `json:"compiler"`
}

type ChecksumAlgorithm

type ChecksumAlgorithm string
const Checksum_MD5 ChecksumAlgorithm = "MD5"
const Checksum_SHA1 ChecksumAlgorithm = "SHA1"
const Checksum_SHA256 ChecksumAlgorithm = "SHA256"

type FileChecksum

type FileChecksum struct {
	Algorithm ChecksumAlgorithm `json:"algorithm"`
	Value     string            `json:"checksumValue"`
}

FileChecksum represents the checksum of the file

type FileFingerprint

type FileFingerprint struct {
	File        string           `json:"file,omitempty"`
	Size        int64            `json:"size,omitempty"`
	Lines       int64            `json:"lines,omitempty"`
	Count       int64            `json:"count,omitempty"`
	License     string           `json:"license,omitempty"`
	Copyright   []string         `json:"copyright,omitempty"`
	Language    string           `json:"language,omitempty"`
	Checksums   []FileChecksum   `json:"checksums,omitempty"`
	Fingerprint FingerprintValue `json:"fingerprint,omitempty"`
}

type Fingerprint

type Fingerprint struct {
	TotalCount  int64             `json:"totalCount,omitempty"`
	Created     string            `json:"created,omitempty"`
	Checksum    string            `json:"checksum,omitempty"`
	OutputMode  string            `json:"outputMode,omitempty"`
	ExternalRef string            `json:"externalRef,omitempty"`
	Vendor      FingerprintVendor `json:"vendor,omitempty"`
	Files       []FileFingerprint `json:"files,omitempty"`
}

type FingerprintValue

type FingerprintValue struct {
	File    string               `json:"file,omitempty"`
	Snippet []SnippetFingerprint `json:"snippet,omitempty"`
}

type FingerprintVendor

type FingerprintVendor struct {
	Name      string `json:"name,omitempty"`
	Tool      string `json:"tool,omitempty"`
	Algorithm string `json:"algorithm,omitempty"`
}

type Language

type Language string
const (
	Language_Unknown    Language = ""
	Language_CPP        Language = "c++"
	Language_Dart       Language = "dart"
	Language_Dotnet     Language = "dotnet"
	Language_Elixir     Language = "elixir"
	Language_Erlang     Language = "erlang"
	Language_Go         Language = "go"
	Language_Haskell    Language = "haskell"
	Language_Java       Language = "java"
	Language_JavaScript Language = "javascript"
	Language_PHP        Language = "php"
	Language_Python     Language = "python"
	Language_Ruby       Language = "ruby"
	Language_Rust       Language = "rust"
	Language_Swift      Language = "swift"
)

type SnippetFingerprint

type SnippetFingerprint struct {
	Range string `json:"range,omitempty"`
	Value string `json:"value,omitempty"`
}

type Source

type Source struct {
	Repository  string      `json:"repository,omitempty"`
	Branch      string      `json:"branch,omitempty"`
	Revision    string      `json:"revision,omitempty"`
	TotalSize   int64       `json:"totalSize,omitempty"`
	TotalFile   int64       `json:"totalFile,omitempty"`
	TotalLine   int64       `json:"totalLine,omitempty"`
	Language    []string    `json:"language,omitempty"`
	Fingerprint Fingerprint `json:"fingerprint,omitempty"`
}

type XSPDXDocument

type XSPDXDocument struct {
	*v2_3.Document
	Source   *Source   `json:"source"`
	Artifact *Artifact `json:"artifact"`
}

func (*XSPDXDocument) UnmarshalJSON

func (d *XSPDXDocument) UnmarshalJSON(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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