depsdev

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package depsdev implements a Bomly license matcher backed by the deps.dev API.

Index

Constants

View Source
const (
	// SourceType identifies deps.dev license provenance in sdk.PackageLicense.Type.
	SourceType = "external-depsdev"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

Checker enriches package licenses from deps.dev.

func New

func New(config Config) (*Checker, error)

New creates a deps.dev license matcher.

func (*Checker) Applicable

func (c *Checker) Applicable(_ context.Context, req sdk.MatchRequest) (bool, error)

Applicable reports whether the checker applies to the request.

func (*Checker) Descriptor

func (c *Checker) Descriptor() sdk.MatcherDescriptor

Descriptor returns the matcher registration metadata.

func (*Checker) Match

func (c *Checker) Match(ctx context.Context, req sdk.MatchRequest) (sdk.MatchResult, error)

Match enriches missing package licenses via deps.dev.

func (*Checker) Ready

func (c *Checker) Ready() bool

Ready reports whether the checker can run.

type Config

type Config struct {
	APIBase            string
	CacheDir           string
	CacheTTL           time.Duration
	Logger             *zap.Logger
	Client             *http.Client
	HTTPClientProvider *sdk.HTTPClientProvider
}

Config configures the deps.dev license matcher.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a production-ready deps.dev matcher config.

Jump to

Keyboard shortcuts

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