github.com/quay/claircore@v1.5.28/photon/releases.go (about) 1 package photon 2 3 import "github.com/quay/claircore" 4 5 // Release indicates the Photon release OVAL database to pull from. 6 type Release string 7 8 // These are some known Releases. 9 const ( 10 Photon1 Release = `photon1` 11 Photon2 Release = `photon2` 12 Photon3 Release = `photon3` 13 ) 14 15 var photon1Dist = &claircore.Distribution{ 16 Name: "VMware Photon OS", 17 Version: "1.0", 18 VersionID: "1.0", 19 PrettyName: "VMware Photon OS/Linux", 20 DID: "photon", 21 } 22 23 var photon2Dist = &claircore.Distribution{ 24 Name: "VMware Photon OS", 25 Version: "2.0", 26 VersionID: "2.0", 27 PrettyName: "VMware Photon OS/Linux", 28 DID: "photon", 29 } 30 31 var photon3Dist = &claircore.Distribution{ 32 Name: "VMware Photon OS", 33 Version: "3.0", 34 VersionID: "3.0", 35 PrettyName: "VMware Photon OS/Linux", 36 DID: "photon", 37 } 38 39 func releaseToDist(r Release) *claircore.Distribution { 40 switch r { 41 case Photon1: 42 return photon1Dist 43 case Photon2: 44 return photon2Dist 45 case Photon3: 46 return photon3Dist 47 default: 48 // return empty dist 49 return &claircore.Distribution{} 50 } 51 }