-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
44 lines (38 loc) · 1001 Bytes
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"time"
)
// DTO containing the data collected by this tool
type ImageData struct {
Findings []FindingData
Image string
BuildTimestamp time.Time
}
// information where the image has been found
type FindingData struct {
Namespace string
PodName string
NotificationData *NotificationData
}
// Data annotated on the namespace level to contact the image owner
type NotificationData struct {
Email string // email address to notify, when image is outdated
//ToDo: Support more notification methods
}
// customized result output format
type ResultGroupedByEmail struct {
//key: email address
Notifications map[string]ResultGroupedByEmailOutdatedImages
}
type ResultGroupedByEmailOutdatedImages struct {
//key: image name
Images map[string]ResultContentData
}
type ResultContentData struct {
BuildTimestamp string
Findings []ResultContentFindingData
}
type ResultContentFindingData struct {
Namespace string
PodName string
}