client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCustomHeaders

func WithCustomHeaders(ctx context.Context, customHeaders http.Header) context.Context

WithCustomHeaders adds custom headers to request headers

Types

type Option

type Option func(*options)

func WithRPCClient

func WithRPCClient(c rpc.Scanner) Option

WithRPCClient takes rpc client for testability

type Scanner

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

Scanner implements the RPC scanner

func NewScanner

func NewScanner(scannerOptions ScannerOption, opts ...Option) Scanner

NewScanner is the factory method to return RPC Scanner

func (Scanner) Scan

func (s Scanner) Scan(ctx context.Context, target, artifactKey string, blobKeys []string, opts types.ScanOptions) (types.Results, ftypes.OS, error)

Scan scans the image

type ScannerOption

type ScannerOption struct {
	RemoteURL     string
	Insecure      bool
	CustomHeaders http.Header
	PathPrefix    string
}

ScannerOption holds options for RPC client

Jump to

Keyboard shortcuts

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