1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

add model for publishers in aggregator

This commit is contained in:
Sascha L. Teichmann 2022-08-16 11:35:51 +02:00
parent 696fb74b36
commit 8e0812c82f

View file

@ -218,12 +218,26 @@ type AggregatorCSAFProvider struct {
Mirrors []ProviderURL `json:"mirrors,omitempty"` // required
}
// AggregatorCSAFPublisher reflects one publisher in an aggregator.
type AggregatorCSAFPublisher struct {
Metadata *AggregatorCSAFProviderMetadata `json:"metadata,omitempty"` // required
Mirrors []ProviderURL `json:"mirrors,omitempty"` // required
UpdateInterval string `json:"update_interval,omitempty"` // required
}
// FromProvider fills a publisher from a provider.
func (acpub *AggregatorCSAFPublisher) FromProvider(acpro *AggregatorCSAFProvider) {
acpub.Metadata = acpro.Metadata
acpub.Mirrors = acpro.Mirrors
}
// Aggregator is the CSAF Aggregator.
type Aggregator struct {
Aggregator *AggregatorInfo `json:"aggregator,omitempty"` // required
Version *AggregatorVersion `json:"aggregator_version,omitempty"` // required
CanonicalURL *AggregatorURL `json:"canonical_url,omitempty"` // required
CSAFProviders []*AggregatorCSAFProvider `json:"csaf_providers,omitempty"` // required
CSAFPublishers []*AggregatorCSAFPublisher `json:"csaf_publishers,omitempty"`
LastUpdated *TimeStamp `json:"last_updated,omitempty"` // required
}