mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Started with cleaning up the provider metadata loading
This commit is contained in:
parent
3445e58e45
commit
1854678409
1 changed files with 0 additions and 17 deletions
17
csaf/util.go
17
csaf/util.go
|
|
@ -22,23 +22,6 @@ import (
|
|||
"github.com/csaf-poc/csaf_distribution/util"
|
||||
)
|
||||
|
||||
// LoadedProviderMetadata represents a loaded provider metadata.
|
||||
type LoadedProviderMetadata struct {
|
||||
// URL is location where the document was found.
|
||||
URL string
|
||||
// Document is the de-serialized JSON document.
|
||||
Document any
|
||||
// Hash is a SHA256 sum over the document.
|
||||
Hash []byte
|
||||
// Messages are the error message happened while loading.
|
||||
Messages []string
|
||||
}
|
||||
|
||||
// Valid returns true if the loaded document is valid.
|
||||
func (lpm *LoadedProviderMetadata) Valid() bool {
|
||||
return lpm != nil && lpm.Document != nil && lpm.Hash != nil
|
||||
}
|
||||
|
||||
// defaultLogging generates a logging function if given is nil.
|
||||
func defaultLogging(
|
||||
logging func(format string, args ...any),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue