Documentation
¶
Index ¶
- func AddScanner(id string) error
- func CheckRegistry(name string) bool
- func FedRoleChangeNotify(fedRole string)
- func FixRegRepoForAdmCtrl(result *share.ScanResult)
- func GetAwsEcrAuthToken(awsKey *share.CLUSAWSAccountKey, proxy string) (*awsEcrAuth, error)
- func GetImageCVECount(name, id string) (int, int, int, error)
- func GetProxy(registry string) string
- func GetRegistryCount() int
- func GetRegistryState(name string) string
- func GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, ...) []*nvsysadmission.ScannedImageSummary
- func InitContext(ctx *Context, leader bool)
- func IsRegistryImageScanned(id string) bool
- func LeadChangeNotify(isLeader bool)
- func RegTaskCount() int
- func RegistryConfigHandler(nType cluster.ClusterNotifyType, key string, value []byte)
- func RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, calculateLayers bool, ...) (utils.Set, []string, []string, []string, []scanUtils.FixedVulInfo, ...)
- func RegistryScanCacheRefresh(ctx context.Context, vpf scanUtils.VPFInterface)
- func RegistryStateUpdate(name string, state *share.CLUSRegistryState)
- func RemoveScanner(id string) error
- func ScannerChangeNotify(isScanner bool)
- func ScannerDBChange(db *share.CLUSScannerDB)
- func UpdateProxy(httpProxy, httpsProxy *share.CLUSProxy)
- type Context
- type Registry
- type ScanInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddScanner ¶
func CheckRegistry ¶
func FedRoleChangeNotify ¶
func FedRoleChangeNotify(fedRole string)
func FixRegRepoForAdmCtrl ¶
func FixRegRepoForAdmCtrl(result *share.ScanResult)
Normalize the request if the registry URL is added to the repo field
func GetAwsEcrAuthToken ¶
func GetAwsEcrAuthToken(awsKey *share.CLUSAWSAccountKey, proxy string) (*awsEcrAuth, error)
func GetRegistryState ¶
func GetScannedImageSummary ¶
func GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, vpf scanUtils.VPFInterface) []*nvsysadmission.ScannedImageSummary
func InitContext ¶
func IsRegistryImageScanned ¶
func LeadChangeNotify ¶
func LeadChangeNotify(isLeader bool)
func RegTaskCount ¶
func RegTaskCount() int
func RegistryConfigHandler ¶
func RegistryConfigHandler(nType cluster.ClusterNotifyType, key string, value []byte)
func RegistryScanCacheRefresh ¶
func RegistryScanCacheRefresh(ctx context.Context, vpf scanUtils.VPFInterface)
func RegistryStateUpdate ¶
func RegistryStateUpdate(name string, state *share.CLUSRegistryState)
Allow manual start/stop scan even if auto-scan is enabled, scan can be restarted manually or when new images added
func RemoveScanner ¶
func ScannerChangeNotify ¶
func ScannerChangeNotify(isScanner bool)
func ScannerDBChange ¶
func ScannerDBChange(db *share.CLUSScannerDB)
func UpdateProxy ¶
Types ¶
type ScanInterface ¶
type ScanInterface interface { // registry GetRegistry(name string, acc *access.AccessControl) (*api.RESTRegistry, error) GetRegistryState(name string, acc *access.AccessControl) (*share.CLUSRegistryState, error) GetRegistrySummary(name string, acc *access.AccessControl) (*api.RESTRegistrySummary, error) GetAllRegistrySummary(scope string, acc *access.AccessControl) []*api.RESTRegistrySummary GetRegistryImageSummary(name string, vpf scanUtils.VPFInterface, acc *access.AccessControl) []*api.RESTRegistryImageSummary GetRegistryVulnerabilities(name string, vpf scanUtils.VPFInterface, showTag string, acc *access.AccessControl) (map[string][]*api.RESTVulnerability, map[string][]api.RESTIDName, error) GetRegistryBenches(name string, tagMap map[string][]string, acc *access.AccessControl) (map[string][]*api.RESTBenchItem, map[string][]api.RESTIDName, error) GetRegistryImageReport(name, id string, vpf scanUtils.VPFInterface, showTag string, tagMap map[string][]string, acc *access.AccessControl) (*api.RESTScanReport, error) GetRegistryLayersReport(name, id string, vpf scanUtils.VPFInterface, showTag string, acc *access.AccessControl) (*api.RESTScanLayersReport, error) GetRegistryDebugImages(source string) []*api.RESTRegistryDebugImage StartRegistry(name string) error StopRegistry(name string) error GetFedRegistryCache(getCfg, getNames bool) ([]*share.CLUSRegistryConfig, utils.Set) CheckRegistry(name string) bool GetRegistryImagesIDs(name string, vpf scanUtils.VPFInterface, showTag string, acc *access.AccessControl) ([]string, error) // GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, vpf scanUtils.VPFInterface) []*nvsysadmission.ScannedImageSummary // RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, vpf scanUtils.VPFInterface) (utils.Set, []string, []string) StoreRepoScanResult(result *share.ScanResult) error TestRegistry(ctx context.Context, config *share.CLUSRegistryConfig, tracer httptrace.HTTPTrace) error }
func Init ¶
func Init(ctx *Context, leader bool) ScanInterface
Click to show internal directories.
Click to hide internal directories.