baseimage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0, BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package baseimage enriches inventory layer details with potential base images from deps.dev.

Index

Constants

View Source
const (
	// Name is the name of the base image enricher.
	Name = "baseimage"
	// Version is the version of the base image enricher.
	Version = 0
)

Variables

This section is empty.

Functions

func NewDefault

func NewDefault() enricher.Enricher

NewDefault returns a new base image enricher with the default configuration. It will log.Fatal if the enricher cannot be created.

Types

type Client

type Client interface {
	QueryContainerImages(ctx context.Context, req *Request) (*Response, error)
}

Client is the interface for the deps.dev client.

type ClientGRPC

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

ClientGRPC is the GRPC client for the deps.dev client.

func NewClientGRPC

func NewClientGRPC(client grpcpb.InsightsClient) *ClientGRPC

NewClientGRPC returns a new ClientGRPC.

func (*ClientGRPC) QueryContainerImages

func (c *ClientGRPC) QueryContainerImages(ctx context.Context, req *Request) (*Response, error)

QueryContainerImages queries the deps.dev client for container images.

type Config

type Config struct {
	Client Client
}

Config is the configuration for the base image enricher.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration for the base image enricher.

type Enricher

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

Enricher enriches inventory layer details with potential base images from deps.dev.

func New

func New(cfg *Config) (*Enricher, error)

New returns a new base image enricher.

func (*Enricher) Config

func (e *Enricher) Config() *Config

Config returns the configuration for the base image enricher.

func (*Enricher) Enrich

Enrich enriches the inventory with base image information from deps.dev.

func (*Enricher) Name

func (*Enricher) Name() string

Name of the base image enricher.

func (*Enricher) RequiredPlugins

func (*Enricher) RequiredPlugins() []string

RequiredPlugins returns a list of Plugins that need to be enabled for this Enricher to work.

func (*Enricher) Requirements

func (*Enricher) Requirements() *plugin.Capabilities

Requirements of the base image enricher.

func (*Enricher) Version

func (*Enricher) Version() int

Version of the base image enricher.

type Request

type Request struct {
	ChainID string
}

Request is the request for the deps.dev client.

type Response

type Response struct {
	Results []*Result
}

Response is the response for the deps.dev client.

type Result

type Result struct {
	Repository string
}

Result is the result for the deps.dev client.

Jump to

Keyboard shortcuts

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