mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Conversion provider -> publisher is not worth the method.
This commit is contained in:
parent
b608746fac
commit
37d8a8d6df
2 changed files with 6 additions and 13 deletions
|
|
@ -146,13 +146,12 @@ func (p *processor) full() error {
|
||||||
|
|
||||||
// "https://" signals a publisher.
|
// "https://" signals a publisher.
|
||||||
if strings.HasPrefix(j.provider.Domain, "https://") {
|
if strings.HasPrefix(j.provider.Domain, "https://") {
|
||||||
|
pub := &csaf.AggregatorCSAFPublisher{
|
||||||
var pub csaf.AggregatorCSAFPublisher
|
Metadata: j.aggregatorProvider.Metadata,
|
||||||
|
Mirrors: j.aggregatorProvider.Mirrors,
|
||||||
pub.FromProvider(j.aggregatorProvider)
|
UpdateInterval: j.provider.updateInterval(p.cfg),
|
||||||
pub.UpdateInterval = j.provider.updateInterval(p.cfg)
|
}
|
||||||
|
publishers = append(publishers, pub)
|
||||||
publishers = append(publishers, &pub)
|
|
||||||
} else {
|
} else {
|
||||||
providers = append(providers, j.aggregatorProvider)
|
providers = append(providers, j.aggregatorProvider)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -225,12 +225,6 @@ type AggregatorCSAFPublisher struct {
|
||||||
UpdateInterval string `json:"update_interval,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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue