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:
parent
696fb74b36
commit
8e0812c82f
1 changed files with 19 additions and 5 deletions
|
|
@ -218,12 +218,26 @@ type AggregatorCSAFProvider struct {
|
||||||
Mirrors []ProviderURL `json:"mirrors,omitempty"` // required
|
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.
|
// Aggregator is the CSAF Aggregator.
|
||||||
type Aggregator struct {
|
type Aggregator struct {
|
||||||
Aggregator *AggregatorInfo `json:"aggregator,omitempty"` // required
|
Aggregator *AggregatorInfo `json:"aggregator,omitempty"` // required
|
||||||
Version *AggregatorVersion `json:"aggregator_version,omitempty"` // required
|
Version *AggregatorVersion `json:"aggregator_version,omitempty"` // required
|
||||||
CanonicalURL *AggregatorURL `json:"canonical_url,omitempty"` // required
|
CanonicalURL *AggregatorURL `json:"canonical_url,omitempty"` // required
|
||||||
CSAFProviders []*AggregatorCSAFProvider `json:"csaf_providers,omitempty"` // required
|
CSAFProviders []*AggregatorCSAFProvider `json:"csaf_providers,omitempty"` // required
|
||||||
|
CSAFPublishers []*AggregatorCSAFPublisher `json:"csaf_publishers,omitempty"`
|
||||||
LastUpdated *TimeStamp `json:"last_updated,omitempty"` // required
|
LastUpdated *TimeStamp `json:"last_updated,omitempty"` // required
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue