github.com/quay/claircore@v1.5.28/distribution.go (about)

     1  package claircore
     2  
     3  import "github.com/quay/claircore/pkg/cpe"
     4  
     5  // Distribution is the accompanying system context of a package. this
     6  // information aides in CVE detection.
     7  //
     8  // Distribution is modeled after the os-release file found in all linux distributions.
     9  type Distribution struct {
    10  	// unique ID of this distribution. this will be created as discovered by the library
    11  	// and used for persistence and hash map indexes.
    12  	ID string `json:"id"`
    13  	// A lower-case string (no spaces or other characters outside of 0–9, a–z, ".", "_" and "-") identifying the operating system, excluding any version information
    14  	// and suitable for processing by scripts or usage in generated filenames. Example: "DID=fedora" or "DID=debian".
    15  	DID string `json:"did"`
    16  	// A string identifying the operating system.
    17  	// example: "Ubuntu"
    18  	Name string `json:"name"`
    19  	// A string identifying the operating system version, excluding any OS name information,
    20  	// possibly including a release code name, and suitable for presentation to the user.
    21  	// example: "16.04.6 LTS (Xenial Xerus)"
    22  	Version string `json:"version"`
    23  	// A lower-case string (no spaces or other characters outside of 0–9, a–z, ".", "_" and "-") identifying the operating system release code name,
    24  	// excluding any OS name information or release version, and suitable for processing by scripts or usage in generated filenames
    25  	// example: "xenial"
    26  	VersionCodeName string `json:"version_code_name"`
    27  	// A lower-case string (mostly numeric, no spaces or other characters outside of 0–9, a–z, ".", "_" and "-")
    28  	// identifying the operating system version, excluding any OS name information or release code name,
    29  	// example: "16.04"
    30  	VersionID string `json:"version_id"`
    31  	// A string identifying the OS architecture
    32  	// example: "x86_64"
    33  	Arch string `json:"arch"`
    34  	// Optional common platform enumeration identifier
    35  	CPE cpe.WFN `json:"cpe"`
    36  	// A pretty operating system name in a format suitable for presentation to the user.
    37  	// May or may not contain a release code name or OS version of some kind, as suitable. If not set, defaults to "PRETTY_NAME="Linux"".
    38  	// example: "PRETTY_NAME="Fedora 17 (Beefy Miracle)"".
    39  	PrettyName string `json:"pretty_name"`
    40  }