Documentation ¶
Index ¶
- type PackageMetadata
- type RegistryClient
- func (c *RegistryClient) GetLatestVersion(name string) (*VersionInfo, error)
- func (c *RegistryClient) GetPackageMetadata(name string) (*PackageMetadata, error)
- func (c *RegistryClient) GetPackageVersion(name, versionConstraint string) (*VersionInfo, error)
- func (c *RegistryClient) SetBaseURL(url string)
- type RetryConfig
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackageMetadata ¶
type PackageMetadata struct { Name string `json:"name"` Versions map[string]VersionInfo `json:"versions"` DistTags map[string]string `json:"dist-tags"` }
PackageMetadata represents the npm package metadata
type RegistryClient ¶
type RegistryClient struct {
// contains filtered or unexported fields
}
RegistryClient handles communication with the npm registry
func NewRegistryClient ¶
func NewRegistryClient(log *logger.Logger) *RegistryClient
NewRegistryClient creates a new registry client
func (*RegistryClient) GetLatestVersion ¶
func (c *RegistryClient) GetLatestVersion(name string) (*VersionInfo, error)
GetLatestVersion fetches the latest version of a package
func (*RegistryClient) GetPackageMetadata ¶
func (c *RegistryClient) GetPackageMetadata(name string) (*PackageMetadata, error)
GetPackageMetadata fetches metadata for a package
func (*RegistryClient) GetPackageVersion ¶
func (c *RegistryClient) GetPackageVersion(name, versionConstraint string) (*VersionInfo, error)
GetPackageVersion fetches metadata for a specific version of a package
func (*RegistryClient) SetBaseURL ¶
func (c *RegistryClient) SetBaseURL(url string)
type RetryConfig ¶
RetryConfig holds retry-related configuration
Click to show internal directories.
Click to hide internal directories.