def

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyNameResult

func ApplyNameResult(result *models.ManifestResult, nr NameProvider)

func Names

func Names() []string

func RegisterEcosystem

func RegisterEcosystem(eco Ecosystem)

Types

type BasePackageManager

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

func NewPackageManager

func NewPackageManager(name, ecosystem string, lockfileNames ...string) *BasePackageManager

func (*BasePackageManager) DetectLockfile

func (pm *BasePackageManager) DetectLockfile(manifestDir, repoRoot string) *string

func (*BasePackageManager) Ecosystem

func (pm *BasePackageManager) Ecosystem() string

func (*BasePackageManager) LockfileNames

func (pm *BasePackageManager) LockfileNames() []string

func (*BasePackageManager) Name

func (pm *BasePackageManager) Name() string

type Definition

type Definition struct {
	Name        string
	DisplayName string
	Source      executiondag.Source

	OSVEcosystem  string
	GHSAEcosystem string

	PURLType string

	PackageAPIURLFormat  string
	PackagePageURLFormat string

	DependencyFilePatterns []string
	SkipDirectories        []string

	EncodePURLName NameEncoder
	NormalizeName  NameNormalizer
}

func (*Definition) BuildPackageAPIURL

func (d *Definition) BuildPackageAPIURL(packageName string) string

func (*Definition) BuildPackagePageURL

func (d *Definition) BuildPackagePageURL(packageName string) string

type Ecosystem

type Ecosystem interface {
	Name() string
	Definition() *Definition
	DetectManifests(dir string) ([]models.DetectedManifest, error)
	ParseManifest(manifest models.DetectedManifest, repoRoot string) (*models.ManifestResult, error)
	PackageManagers() []PackageManager
	DetectPackageManager(manifestDir, repoRoot string) (PackageManager, *string)
	GitSparseCheckoutFilePatterns() []string
}

func All

func All() []Ecosystem

func Get

func Get(name string) (Ecosystem, error)

type NameEncoder

type NameEncoder func(name string) string

type NameNormalizer

type NameNormalizer func(name string) string

type NameProvider

type NameProvider interface {
	GetName() *string
	GetIsDynamic() bool
	GetDynamicReason() string
}

type PackageManager

type PackageManager interface {
	Name() string
	Ecosystem() string
	LockfileNames() []string
	DetectLockfile(manifestDir, repoRoot string) *string
}

Jump to

Keyboard shortcuts

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