client

package
v0.61.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: Apache-2.0 Imports: 13 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 Service added in v0.61.1

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

Service implements the RPC client for remote scanning

func NewService added in v0.61.1

func NewService(scannerOptions ServiceOption, opts ...Option) Service

NewService is the factory method to return RPC Service

func (Service) Scan added in v0.61.1

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

Scan scans the image

type ServiceOption added in v0.61.1

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

ServiceOption holds options for RPC client

Jump to

Keyboard shortcuts

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