Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Types ¶
type PackageData ¶
type PackageData struct { Name string Version string // Usually a Git hash, but any string can be used LicenseDeclared string Targets []*Target Project string // The project this package is associated with. }
PackageData contains metadata about a specific package.
func GetPackageData ¶
func GetPackageData(pkg *module.PackageNodeProxy, projectName string) (*PackageData, error)
func (*PackageData) GetAuthors ¶
func (p *PackageData) GetAuthors() []string
func (*PackageData) GetLicenses ¶
func (p *PackageData) GetLicenses() []string
func (*PackageData) MarshalJSON ¶
func (p *PackageData) MarshalJSON() ([]byte, error)
type ProjectData ¶
type ProjectData struct { Name string // The project name, e.g. "CURL" or "Linux" 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 Site *SiteData // The site this page is associated with }
ProjectData is the project metadata that the report will visualize. ProjectData is expected to stay more or less constant across versions of the package. oc... refers to OpenChain related fields
func GetProjectData ¶
func GetProjectData(proj *service.ProjectNode, siteData *SiteData) *ProjectData
type Reporter ¶
type Reporter struct { module.MasterClient // contains filtered or unexported fields }
Reporter contains the fields provided to every report
func NewReporter ¶
func NewReporter(repModule 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(masterClient *module.MasterClient) error PostReport() error }
ReporterModule defines the methods required to implement a reporter.