db

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 9

Documentation

Index

Constants

View Source
const (
	SchemaVersion = db.SchemaVersion
)

Variables

View Source
var (
	// GitHub Container Registry
	DefaultGHCRRepository = fmt.Sprintf("%s:%d", "ghcr.io/aquasecurity/trivy-db", db.SchemaVersion)

	Init  = db.Init
	Close = db.Close
	Path  = db.Path
)

Functions

func Dir added in v0.54.0

func Dir(cacheDir string) string

Types

type Client added in v0.2.0

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

Client implements DB operations

func NewClient added in v0.2.0

func NewClient(dbDir string, quiet bool, opts ...Option) *Client

NewClient is the factory method for DB client

func (*Client) Clear added in v0.53.0

func (c *Client) Clear(_ context.Context) error

func (*Client) Download added in v0.2.0

func (c *Client) Download(ctx context.Context, dst string, opt types.RegistryOptions) error

Download downloads the DB file

func (*Client) NeedsUpdate added in v0.3.0

func (c *Client) NeedsUpdate(ctx context.Context, cliVersion string, skip bool) (bool, error)

NeedsUpdate check is DB needs update

func (*Client) ShowInfo added in v0.54.0

func (c *Client) ShowInfo() error

type Option added in v0.23.0

type Option func(*options)

Option is a functional option

func WithDBRepository added in v0.25.1

func WithDBRepository(dbRepository []name.Reference) Option

WithDBRepository takes a dbRepository

func WithOCIArtifact added in v0.23.0

func WithOCIArtifact(art *oci.Artifact) Option

WithOCIArtifact takes an OCI artifact

Jump to

Keyboard shortcuts

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