Documentation ¶
Index ¶
- func CommitMessageSummary(message string) string
- func DetectModuleSharedDataDirectory(moduleName string) (string, error)
- func DetectSharedDataDirectory() (string, error)
- func GetBOM(pkg *service.PackageNode, enableWarnings bool, enableErrors bool) (*service.BOM, error)
- func ShortenedVersionIdentifier(message string) string
- type PackageData
- type Reporter
- type ReporterModule
- type RevisionData
- type SiteData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitMessageSummary ¶
CommitMessageSummary returns the summary of the commit message according to the usual guidelines (see https://chris.beams.io/posts/git-commit/, "Limit the subject line to 50 characters")
func DetectModuleSharedDataDirectory ¶
DetectModuleSharedDataDirectory detects the directory where QMSTR's shared data is stored.
func DetectSharedDataDirectory ¶
DetectSharedDataDirectory detects the shared data directory for all of QMSTR. It looks for /usr/share/qmstr, /usr/local/share/qmstr and /opt/share/qmstr, in that order.
func ShortenedVersionIdentifier ¶
ShortenedVersionIdentifier calculates shortened version of the version identifier, in upper-case characters
Types ¶
type PackageData ¶
type PackageData struct { PackageName string // The package name, e.g. "CURL" or "Linux" BuildConfig string // The name of the build configuration e.g. "amd_64_something" Vendor string // Name of the entity distributing this package OcFossLiaison string // Name of the FOSS liaison function OcComplianceContact string // Email address acting as the general FOSS compliance contact for the vendor LicenseDeclared string Targets []*service.Target Site *SiteData // The site this page is associated with }
PackageData is the package metadata that the report will visualize. PackageData is expected to stay more or less constant across versions of the package. oc... refers to OpenChain related fields
func GetPackageData ¶
func GetPackageData(bom *service.BOM, siteData *SiteData) *PackageData
GetPackageData extracts the package data from the given BOM
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter contains the fields provided to every report
func NewReporter ¶
func NewReporter(module ReporterModule) *Reporter
NewReporter creates a new reporter.
func (*Reporter) GetModuleName ¶
GetModuleName returns the module name
func (*Reporter) RunReporterModule ¶
RunReporterModule is the main driver function for each reporter.
type ReporterModule ¶
type ReporterModule interface { Configure(configMap map[string]string) error Report(cserv service.ControlServiceClient, rserv service.ReportServiceClient) error PostReport() error }
ReporterModule defines the methods required to implement a reporter.
type RevisionData ¶
type RevisionData struct { VersionIdentifier string // Usually a Git hash, but any string can be used ChangeDateTime string // The change timestamp Author string // The author of the change Message string // The commit message Package *PackageData // The package this version is associated with. }
RevisionData contains metadata about a specific revision.
func GetRevisionData ¶
func GetRevisionData(bom *service.BOM, packageData *PackageData) *RevisionData
GetRevisionData extracts the revision data from the BOM