scanner

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunScanner

func RunScanner(configPath string, stop <-chan struct{})

Types

type Config

type Config struct {
	Hub         *HubConfig
	ImageFacade *ImageFacadeConfig
	Perceptor   *PerceptorConfig

	LogLevel string
	Port     int
}

func GetConfig

func GetConfig(configPath string) (*Config, error)

func (*Config) GetLogLevel

func (config *Config) GetLogLevel() (log.Level, error)

type HubConfig

type HubConfig struct {
	User                 string
	PasswordEnvVar       string
	Port                 int
	ClientTimeoutSeconds int
}

type HubScanClient

type HubScanClient struct {
	// contains filtered or unexported fields
}

HubScanClient implements ScanClientInterface using the Black Duck hub and scan client programs.

func NewHubScanClient

func NewHubScanClient(username string, port int, scanClientInfo *scanClientInfo, imagePuller ImagePullerInterface) (*HubScanClient, error)

NewHubScanClient requires hub login credentials

func (*HubScanClient) Scan

func (hsc *HubScanClient) Scan(job ScanJob) error

type ImageFacadeConfig

type ImageFacadeConfig struct {
	Host string
	Port int
}

func (*ImageFacadeConfig) GetHost

func (ifc *ImageFacadeConfig) GetHost() string

type ImageFacadePuller

type ImageFacadePuller struct {
	ImageFacadeHost string
	ImageFacadePort int
	// contains filtered or unexported fields
}

func NewImageFacadePuller

func NewImageFacadePuller(imageFacadeHost string, imageFacadePort int) *ImageFacadePuller

func (*ImageFacadePuller) PullImage

func (ifp *ImageFacadePuller) PullImage(image *common.Image) error

type ImagePullerInterface

type ImagePullerInterface interface {
	PullImage(image *common.Image) error
}

type PerceptorConfig

type PerceptorConfig struct {
	Host string
	Port int
}

type ScanClientInterface

type ScanClientInterface interface {
	Scan(job ScanJob) error
}

type ScanJob

type ScanJob struct {
	PullSpec              string
	Sha                   string
	HubHost               string
	HubProjectName        string
	HubProjectVersionName string
	HubScanName           string
}

func NewScanJob

func NewScanJob(repository string, sha string, hubHost string, hubProjectName string, hubProjectVersionName string, hubScanName string) *ScanJob

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(config *Config, stop <-chan struct{}) (*Scanner, error)

func (*Scanner) StartRequestingScanJobs

func (scanner *Scanner) StartRequestingScanJobs()

StartRequestingScanJobs will start asking for work

Jump to

Keyboard shortcuts

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