diff options
Diffstat (limited to 'pkg/storage/index')
-rw-r--r-- | pkg/storage/index/index.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/storage/index/index.go b/pkg/storage/index/index.go index 0056565..bf94711 100644 --- a/pkg/storage/index/index.go +++ b/pkg/storage/index/index.go @@ -101,6 +101,13 @@ func (ix *Index) TriggerAlerts() ([]CertificateInfo, error) { return alerts, ioutil.CommitJSON(ix.cfg.IndexFile, ix.mem) } +func (ix *Index) Alerting() (ret []CertificateInfo) { + for _, ci := range ix.mem.Alerting { + ret = append(ret, ci[0]) // one is enough for the same crt ID + } + return +} + func (index *Index) Validate() error { return nil // FIXME: check that the index is populated with valid values } |