utils

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LessThanOrEqual = "lessThenOrEqual"
	LessThen        = "lessThen"
)

Variables

View Source
var (
	UpstreamOrgName = map[string]string{
		"k8s.io":      "controller-manager,kubelet,apiserver,kubectl,kubernetes,kube-scheduler,kube-proxy",
		"sigs.k8s.io": "secrets-store-csi-driver",
	}

	UpstreamRepoName = map[string]string{
		"kube-controller-manager":  "controller-manager",
		"kubelet":                  "kubelet",
		"kube-apiserver":           "apiserver",
		"kubectl":                  "kubectl",
		"kubernetes":               "kubernetes",
		"kube-scheduler":           "kube-scheduler",
		"kube-proxy":               "kube-proxy",
		"api server":               "apiserver",
		"secrets-store-csi-driver": "secrets-store-csi-driver",
	}
)

Functions

func CacheDir

func CacheDir() string

func CvssVectorToScore

func CvssVectorToScore(vector string) (string, float64)

func ExtractRangeVersions

func ExtractRangeVersions(introduce string) (string, string)

func GetComponentFromDescription

func GetComponentFromDescription(descriptions string, currentComponent string) string

func GetLastUpdatedDate

func GetLastUpdatedDate(dist string) (time.Time, error)

func GetMultiIDs

func GetMultiIDs(id string) []string

func K8sCveDir

func K8sCveDir() string

func MinorVersion

func MinorVersion(version string) bool

MinorVersion returns true if version is minor version 1.1 or 2.2 and etc

func SetLastUpdatedDate

func SetLastUpdatedDate(dist string, lastUpdatedDate time.Time) error

func TrimString

func TrimString(version string, trimValues []string) string

func UpdateVersions

func UpdateVersions(to, introduce string) (string, string)

func UpstreamOrgByName

func UpstreamOrgByName(component string) string

func UpstreamRepoByName

func UpstreamRepoByName(component string) string

Types

type LastUpdated

type LastUpdated map[string]time.Time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL