Documentation ¶
Index ¶
- func RunScanner(configPath string, stop <-chan struct{})
- type BlackDuckConfig
- type Config
- type Host
- type ImageFacadeClient
- type ImageFacadeClientInterface
- type ImageFacadeConfig
- type Manager
- type OSType
- type PerceptorClient
- type PerceptorClientInterface
- type PerceptorConfig
- type ScanClient
- type ScanClientInfo
- type ScanClientInterface
- type Scanner
- type ScannerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlackDuckConfig ¶
BlackDuckConfig stores the Black Duck configuration
type Config ¶
type Config struct { BlackDuck *BlackDuckConfig ImageFacade *ImageFacadeConfig Perceptor *PerceptorConfig Scanner *ScannerConfig LogLevel string }
Config stores the input scanner configurqtion
type Host ¶
type Host struct { Scheme string `json:"scheme"` Domain string `json:"domain"` // it can be domain name or ip address Port int `json:"port"` User string `json:"user"` Password string `json:"password"` }
Host configures the Black Duck hosts
type ImageFacadeClient ¶
type ImageFacadeClient struct { ImageFacadeHost string ImageFacadePort int // contains filtered or unexported fields }
ImageFacadeClient ...
func NewImageFacadeClient ¶
func NewImageFacadeClient(imageFacadeHost string, imageFacadePort int) *ImageFacadeClient
NewImageFacadeClient ...
type ImageFacadeClientInterface ¶
ImageFacadeClientInterface ...
type ImageFacadeConfig ¶
ImageFacadeConfig stores the image facade configuration
func (*ImageFacadeConfig) GetHost ¶
func (ifc *ImageFacadeConfig) GetHost() string
GetHost return the image facade host
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager ...
func NewManager ¶
NewManager return the manager type
func (*Manager) StartRequestingScanJobs ¶
func (sm *Manager) StartRequestingScanJobs()
StartRequestingScanJobs will start asking for work
type PerceptorClient ¶
PerceptorClient stores the Perceptor configurations
func NewPerceptorClient ¶
func NewPerceptorClient(host string, port int) *PerceptorClient
NewPerceptorClient return the Perceptor client configuration
func (*PerceptorClient) GetNextImage ¶
func (pc *PerceptorClient) GetNextImage() (*api.NextImage, error)
GetNextImage return the next image or artifact from the queue
func (*PerceptorClient) PostFinishedScan ¶
func (pc *PerceptorClient) PostFinishedScan(scan *api.FinishedScanClientJob) error
PostFinishedScan updates the perceptor about the Black Duck scan
type PerceptorClientInterface ¶
type PerceptorClientInterface interface { GetNextImage() (*api.NextImage, error) PostFinishedScan(scan *api.FinishedScanClientJob) error }
PerceptorClientInterface provides an interface for accessing the perceptor
type PerceptorConfig ¶
PerceptorConfig stores the perceptor client configuration
type ScanClient ¶
type ScanClient struct {
// contains filtered or unexported fields
}
ScanClient implements ScanClientInterface using the Black Duck hub and scan client programs.
func NewScanClient ¶
func NewScanClient(tlsVerification bool) (*ScanClient, error)
NewScanClient requires hub login credentials
func (*ScanClient) Scan ¶
func (sc *ScanClient) Scan(scheme string, host string, port int, username string, password string, path string, projectName string, versionName string, scanName string) error
Scan executes the Black Duck scan for the input artifact
func (*ScanClient) ScanSh ¶
func (sc *ScanClient) ScanSh(hubScheme string, host string, port int, username string, password string, path string, projectName string, versionName string, scanName string) error
ScanSh invokes scan.cli.sh example:
BD_HUB_PASSWORD=??? ./bin/scan.cli.sh --host ??? --port 443 --scheme https --username sysadmin --insecure --name ??? --release ??? --project ??? ???.tar
type ScanClientInfo ¶
ScanClientInfo ...
func DownloadScanClient ¶
func DownloadScanClient(osType OSType, cliRootPath string, hubScheme string, hubHost string, hubUser string, hubPassword string, hubPort int, timeout time.Duration) (*ScanClientInfo, error)
DownloadScanClient downloads the Black Duck scan client
func NewScanClientInfo ¶
func NewScanClientInfo(hubVersion string, rootPath string, osType OSType) *ScanClientInfo
NewScanClientInfo ...
func (*ScanClientInfo) ScanCliImplJarPath ¶
func (sci *ScanClientInfo) ScanCliImplJarPath() string
ScanCliImplJarPath ...
func (*ScanClientInfo) ScanCliJarPath ¶
func (sci *ScanClientInfo) ScanCliJarPath() string
ScanCliJarPath ...
func (*ScanClientInfo) ScanCliJavaPath ¶
func (sci *ScanClientInfo) ScanCliJavaPath() string
ScanCliJavaPath ...
func (*ScanClientInfo) ScanCliShPath ¶
func (sci *ScanClientInfo) ScanCliShPath() string
ScanCliShPath ...
func (*ScanClientInfo) ScanCliZipPath ¶
func (sci *ScanClientInfo) ScanCliZipPath() string
ScanCliZipPath ...
type ScanClientInterface ¶
type ScanClientInterface interface {
Scan(scheme string, host string, port int, username string, password string, path string, projectName string, versionName string, scanName string) error
}
ScanClientInterface ...
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner stores the scanner configurations
func NewScanner ¶
func NewScanner(ifClient ImageFacadeClientInterface, scanClient ScanClientInterface, imageDirectory string, stop <-chan struct{}) *Scanner
NewScanner return the Scanner configurations
type ScannerConfig ¶
ScannerConfig stores the scanner configuration
func (*ScannerConfig) GetImageDirectory ¶
func (config *ScannerConfig) GetImageDirectory() string
GetImageDirectory return the image directory to store the pulled artifactory