Documentation ¶
Index ¶
- Constants
- func EnsureDefaultScanner(ctx context.Context, scannerName string) (err error)
- func EnsureScanners(ctx context.Context, wantedScanners []scanner.Registration) (err error)
- func ExtractScanReq(params job.Parameters) (*v1.ScanRequest, error)
- func RemoveImmutableScanners(ctx context.Context, names []string) error
- type CheckInReport
- type Job
Constants ¶
View Source
const ( // JobParamRegistration ... JobParamRegistration = "registration" // JobParameterRequest ... JobParameterRequest = "scanRequest" // JobParameterMimes ... JobParameterMimes = "mimeTypes" // JobParameterAuthType ... JobParameterAuthType = "authType" // JobParameterRobot ... JobParameterRobot = "robotAccount" )
Variables ¶
This section is empty.
Functions ¶
func EnsureDefaultScanner ¶
EnsureDefaultScanner ensures that the scanner with the specified URL is set as default in the system.
func EnsureScanners ¶
func EnsureScanners(ctx context.Context, wantedScanners []scanner.Registration) (err error)
EnsureScanners ensures that the scanners with the specified endpoints URLs exist in the system.
func ExtractScanReq ¶
func ExtractScanReq(params job.Parameters) (*v1.ScanRequest, error)
ExtractScanReq extracts the scan request from the job parameters.
Types ¶
type CheckInReport ¶
type CheckInReport struct { Digest string `json:"digest"` RegistrationUUID string `json:"registration_uuid"` MimeType string `json:"mime_type"` RawReport string `json:"raw_report"` }
CheckInReport defines model for checking in the scan report with specified mime.
func (*CheckInReport) FromJSON ¶
func (cir *CheckInReport) FromJSON(jsonData string) error
FromJSON parse json to CheckInReport
func (*CheckInReport) ToJSON ¶
func (cir *CheckInReport) ToJSON() (string, error)
ToJSON marshal CheckInReport to JSON
type Job ¶
type Job struct{}
Job for running scan in the job service with async way
func (*Job) MaxCurrency ¶
MaxCurrency is implementation of same method in Interface.
func (*Job) ShouldRetry ¶
ShouldRetry indicates if the job should be retried
Click to show internal directories.
Click to hide internal directories.