From 1854678409cd77a4c14946ab008d64de8d8a92c5 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Fri, 24 Mar 2023 18:59:38 +0100 Subject: [PATCH] Started with cleaning up the provider metadata loading --- csaf/util.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/csaf/util.go b/csaf/util.go index 1e7cf97..ecef653 100644 --- a/csaf/util.go +++ b/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),