resolution

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Overview

Package resolution provides clients required by dependency resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWithRegistries

type ClientWithRegistries interface {
	resolve.Client
	// AddRegistries adds the specified registries to fetch data.
	AddRegistries(registries []Registry) error
}

ClientWithRegistries is a resolve.Client that allows package registries to be added.

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, userAgent string) (*DepsDevClient, error)

NewDepsDevClient creates a new DepsDevClient.

type MavenRegistryClient

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

MavenRegistryClient is a client to fetch data from Maven registry.

func NewMavenRegistryClient

func NewMavenRegistryClient(registry string) (*MavenRegistryClient, error)

NewMavenRegistryClient makes a new MavenRegistryClient.

func (*MavenRegistryClient) AddRegistries

func (c *MavenRegistryClient) AddRegistries(registries []Registry) error

AddRegistries adds registries to the MavenRegistryClient.

func (*MavenRegistryClient) MatchingVersions

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

MatchingVersions returns versions matching the requirement specified by the VersionKey.

func (*MavenRegistryClient) Requirements

Requirements returns requirements of a version specified by the VersionKey.

func (*MavenRegistryClient) Version

Version returns metadata of a version specified by the VersionKey.

func (*MavenRegistryClient) Versions

Versions returns all the available versions of the package specified by the given PackageKey. TODO: we should also include versions not listed in the metadata file There exist versions in the repository but not listed in the metada file, for example version 20030203.000550 of package commons-io:commons-io https://repo1.maven.org/maven2/commons-io/commons-io/20030203.000550/. A package may depend on such version if a soft requirement of this version is declared. We need to find out if there are such versions and include them in the returned versions.

type OverrideClient

type OverrideClient struct {
	resolve.Client
	// contains filtered or unexported fields
}

OverrideClient wraps a resolve.Client, allowing for custom packages & versions to be added

func NewOverrideClient

func NewOverrideClient(c resolve.Client) *OverrideClient

NewOverrideClient makes a new OverrideClient.

func (*OverrideClient) AddVersion

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

AddVersion adds the specified version and dependencies to the client.

func (*OverrideClient) MatchingVersions

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

MatchingVersions returns the versions matching the requirement specified by the VersionKey.

func (*OverrideClient) Requirements

Requirements returns the requirement versions of the version specified by the VersionKey.

func (*OverrideClient) Version

Version returns the version specified by the VersionKey.

func (*OverrideClient) Versions

Versions returns the versions of a package specified by the PackageKey.

type Registry

type Registry any

Registry is the interface of a registry to fetch data.

Jump to

Keyboard shortcuts

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