1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00
gocsaf/cmd/csaf_checker/report.go
Fadi Abbud 13423c3d4d
Add datetime and version info to report of checker
Resolve #142 

Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2022-05-24 16:59:27 +02:00

33 lines
1,017 B
Go

// This file is Free Software under the MIT License
// without warranty, see README.md and LICENSES/MIT.txt for details.
//
// SPDX-License-Identifier: MIT
//
// SPDX-FileCopyrightText: 2021 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2021 Intevation GmbH <https://intevation.de>
package main
// Requirement a single requirement report of a domain.
type Requirement struct {
Num int `json:"num"`
Description string `json:"description"`
Messages []string `json:"messages,omitempty"`
}
// Domain are the results of a domain.
type Domain struct {
Name string `json:"name"`
Requirements []*Requirement `json:"requirements,omitempty"`
}
// Report is the overall report.
type Report struct {
Domains []*Domain `json:"domains,omitempty"`
Version string `json:"version,omitempty"`
Date string `json:"date,omitempty"`
}
func (r *Requirement) message(msg ...string) {
r.Messages = append(r.Messages, msg...)
}