Documentation
¶
Overview ¶
Package client provides clients required by dependency resolution.
Index ¶
- type DependencyClient
- type DepsDevClient
- type MavenRegistryClient
- func (c *MavenRegistryClient) AddRegistries(registries []Registry) error
- func (c *MavenRegistryClient) MatchingVersions(ctx context.Context, vk resolve.VersionKey) ([]resolve.Version, error)
- func (c *MavenRegistryClient) Requirements(ctx context.Context, vk resolve.VersionKey) ([]resolve.RequirementVersion, error)
- func (c *MavenRegistryClient) Version(ctx context.Context, vk resolve.VersionKey) (resolve.Version, error)
- func (c *MavenRegistryClient) Versions(ctx context.Context, pk resolve.PackageKey) ([]resolve.Version, error)
- type OverrideClient
- func (c *OverrideClient) AddVersion(v resolve.Version, deps []resolve.RequirementVersion)
- func (c *OverrideClient) MatchingVersions(ctx context.Context, vk resolve.VersionKey) ([]resolve.Version, error)
- func (c *OverrideClient) Requirements(ctx context.Context, vk resolve.VersionKey) ([]resolve.RequirementVersion, error)
- func (c *OverrideClient) Version(ctx context.Context, vk resolve.VersionKey) (resolve.Version, error)
- func (c *OverrideClient) Versions(ctx context.Context, pk resolve.PackageKey) ([]resolve.Version, error)
- type Registry
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
// AddRegistries adds the specified registries to fetch data.
AddRegistries(registries []Registry) error
}
DependencyClient is the interface of the client required by dependency resolution.
type DepsDevClient ¶
DepsDevClient is a ResolutionClient wrapping the official resolve.APIClient
func NewDepsDevClient ¶
func NewDepsDevClient(addr string, userAgent string) (*DepsDevClient, error)
NewDepsDevClient creates a new DepsDevClient.
func (*DepsDevClient) AddRegistries ¶
func (d *DepsDevClient) AddRegistries(_ []Registry) error
AddRegistries is a placeholder here for DepsDevClient.
func (*DepsDevClient) LoadCache ¶
func (d *DepsDevClient) LoadCache(path string) error
LoadCache loads the cache at the given path.
func (*DepsDevClient) WriteCache ¶
func (d *DepsDevClient) WriteCache(path string) error
WriteCache writes cache at the given path.
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 ¶
func (c *MavenRegistryClient) Requirements(ctx context.Context, vk resolve.VersionKey) ([]resolve.RequirementVersion, error)
Requirements returns requirements of a version specified by the VersionKey.
func (*MavenRegistryClient) Version ¶
func (c *MavenRegistryClient) Version(ctx context.Context, vk resolve.VersionKey) (resolve.Version, error)
Version returns metadata of a version specified by the VersionKey.
func (*MavenRegistryClient) Versions ¶
func (c *MavenRegistryClient) Versions(ctx context.Context, pk resolve.PackageKey) ([]resolve.Version, error)
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 {
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
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 ¶
func (c *OverrideClient) Requirements(ctx context.Context, vk resolve.VersionKey) ([]resolve.RequirementVersion, error)
Requirements returns the requirement versions of the version specified by the VersionKey.
func (*OverrideClient) Version ¶
func (c *OverrideClient) Version(ctx context.Context, vk resolve.VersionKey) (resolve.Version, error)
Version returns the version specified by the VersionKey.
func (*OverrideClient) Versions ¶
func (c *OverrideClient) Versions(ctx context.Context, pk resolve.PackageKey) ([]resolve.Version, error)
Versions returns the versions of a package specified by the PackageKey.