client

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyClient

type DependencyClient interface {
	resolve.Client
	// WriteCache writes a manifest-specific resolution cache.
	WriteCache(filepath string) error
	// LoadCache loads a manifest-specific resolution cache.
	LoadCache(filepath string) error
	// PreFetch loads cache, then makes and caches likely queries needed for resolving a package with a list of requirements
	PreFetch(ctx context.Context, requirements []resolve.RequirementVersion, manifestPath string)
}

type DepsDevClient

type DepsDevClient struct {
	resolve.APIClient
	// contains filtered or unexported fields
}

DepsDevClient is a ResolutionClient wrapping the official resolve.APIClient

func NewDepsDevClient

func NewDepsDevClient(addr string) (*DepsDevClient, error)

func (*DepsDevClient) LoadCache

func (d *DepsDevClient) LoadCache(path string) error

func (*DepsDevClient) PreFetch

func (d *DepsDevClient) PreFetch(ctx context.Context, requirements []resolve.RequirementVersion, manifestPath string)

func (*DepsDevClient) WriteCache

func (d *DepsDevClient) WriteCache(path string) error

type NpmRegistryClient added in v1.7.0

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

func NewNpmRegistryClient added in v1.7.0

func NewNpmRegistryClient(workdir string) (*NpmRegistryClient, error)

func (*NpmRegistryClient) LoadCache added in v1.7.0

func (c *NpmRegistryClient) LoadCache(path string) error

func (*NpmRegistryClient) MatchingVersions added in v1.7.0

func (c *NpmRegistryClient) MatchingVersions(ctx context.Context, vk resolve.VersionKey) ([]resolve.Version, error)

func (*NpmRegistryClient) PreFetch added in v1.7.0

func (c *NpmRegistryClient) PreFetch(ctx context.Context, imports []resolve.RequirementVersion, manifestPath string)

func (*NpmRegistryClient) Requirements added in v1.7.0

func (*NpmRegistryClient) Version added in v1.7.0

func (*NpmRegistryClient) Versions added in v1.7.0

func (*NpmRegistryClient) WriteCache added in v1.7.0

func (c *NpmRegistryClient) WriteCache(path string) error

type OSVClient

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

func NewOSVClient

func NewOSVClient() *OSVClient

func (*OSVClient) FindVulns

func (c *OSVClient) FindVulns(g *resolve.Graph) ([]models.Vulnerabilities, error)

type OverrideClient

type OverrideClient struct {
	DependencyClient
	// contains filtered or unexported fields
}

OverrideClient wraps a DependencyClient, allowing for custom packages & versions to be added

func NewOverrideClient

func NewOverrideClient(c DependencyClient) *OverrideClient

func (*OverrideClient) AddVersion

func (c *OverrideClient) AddVersion(v resolve.Version, deps []resolve.RequirementVersion)

func (*OverrideClient) MatchingVersions

func (c *OverrideClient) MatchingVersions(ctx context.Context, vk resolve.VersionKey) ([]resolve.Version, error)

func (*OverrideClient) Requirements

func (*OverrideClient) Version

func (*OverrideClient) Versions

type ResolutionClient

type ResolutionClient struct {
	DependencyClient
	VulnerabilityClient
}

type VulnerabilityClient

type VulnerabilityClient interface {
	// FindVulns finds the vulnerabilities affecting each of Nodes in the graph.
	// The returned Vulnerabilities[i] corresponds to the vulnerabilities in g.Nodes[i].
	FindVulns(g *resolve.Graph) ([]models.Vulnerabilities, error)
}

Jump to

Keyboard shortcuts

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