Documentation
¶
Overview ¶
Package datasource provides a unified interface for querying package registries. This abstraction allows multiple integrations to share the same registry client.
Index ¶
- func List() []string
- func Register(ds Datasource)
- type Datasource
- type DockerHubDatasource
- func (d *DockerHubDatasource) GetLatestVersion(ctx context.Context, pkg string) (string, error)
- func (d *DockerHubDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
- func (d *DockerHubDatasource) GetVersions(ctx context.Context, pkg string) ([]string, error)
- func (d *DockerHubDatasource) Name() string
- type GitHubDatasource
- func (d *GitHubDatasource) GetLatestVersion(ctx context.Context, pkg string) (string, error)
- func (d *GitHubDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
- func (d *GitHubDatasource) GetVersions(ctx context.Context, pkg string) ([]string, error)
- func (d *GitHubDatasource) Name() string
- type HelmDatasource
- func (d *HelmDatasource) GetLatestVersion(ctx context.Context, pkg string) (string, error)
- func (d *HelmDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
- func (d *HelmDatasource) GetVersions(ctx context.Context, pkg string) ([]string, error)
- func (d *HelmDatasource) Name() string
- type NPMDatasource
- func (d *NPMDatasource) GetLatestVersion(ctx context.Context, pkg string) (string, error)
- func (d *NPMDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
- func (d *NPMDatasource) GetVersions(ctx context.Context, pkg string) ([]string, error)
- func (d *NPMDatasource) Name() string
- type PackageInfo
- type TerraformDatasource
- func (d *TerraformDatasource) GetLatestVersion(ctx context.Context, pkg string) (string, error)
- func (d *TerraformDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
- func (d *TerraformDatasource) GetVersions(ctx context.Context, pkg string) ([]string, error)
- func (d *TerraformDatasource) Name() string
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datasource ¶
type Datasource interface {
// Name returns the datasource identifier (e.g., "npm", "pypi", "github-releases")
Name() string
// GetLatestVersion returns the latest stable version for a package.
GetLatestVersion(ctx context.Context, pkg string) (string, error)
// GetVersions returns all available versions for a package.
GetVersions(ctx context.Context, pkg string) ([]string, error)
// GetPackageInfo returns detailed information about a package.
GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
}
Datasource represents a package registry or version source.
type DockerHubDatasource ¶
type DockerHubDatasource struct {
// contains filtered or unexported fields
}
DockerHubDatasource implements the Datasource interface for Docker Hub.
func NewDockerHubDatasource ¶
func NewDockerHubDatasource() *DockerHubDatasource
NewDockerHubDatasource creates a new Docker Hub datasource.
func (*DockerHubDatasource) GetLatestVersion ¶
GetLatestVersion returns the latest stable version for a Docker image.
func (*DockerHubDatasource) GetPackageInfo ¶
func (d *DockerHubDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
GetPackageInfo returns detailed information about a Docker image.
func (*DockerHubDatasource) GetVersions ¶
GetVersions returns all available tags for a Docker image.
func (*DockerHubDatasource) Name ¶
func (d *DockerHubDatasource) Name() string
Name returns the datasource identifier.
type GitHubDatasource ¶
type GitHubDatasource struct {
// contains filtered or unexported fields
}
GitHubDatasource implements the Datasource interface for GitHub Releases.
func NewGitHubDatasource ¶
func NewGitHubDatasource() *GitHubDatasource
NewGitHubDatasource creates a new GitHub datasource.
func (*GitHubDatasource) GetLatestVersion ¶
GetLatestVersion returns the latest stable release for a GitHub repository.
func (*GitHubDatasource) GetPackageInfo ¶
func (d *GitHubDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
GetPackageInfo returns detailed information about a GitHub repository's releases.
func (*GitHubDatasource) GetVersions ¶
GetVersions returns all available releases for a GitHub repository.
func (*GitHubDatasource) Name ¶
func (d *GitHubDatasource) Name() string
Name returns the datasource identifier.
type HelmDatasource ¶
type HelmDatasource struct {
// contains filtered or unexported fields
}
HelmDatasource implements the Datasource interface for Helm chart repositories.
func NewHelmDatasource ¶
func NewHelmDatasource() *HelmDatasource
NewHelmDatasource creates a new Helm datasource.
func (*HelmDatasource) GetLatestVersion ¶
GetLatestVersion returns the latest stable version for a Helm chart.
func (*HelmDatasource) GetPackageInfo ¶
func (d *HelmDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
GetPackageInfo returns detailed information about a Helm chart.
func (*HelmDatasource) GetVersions ¶
GetVersions returns all available versions for a Helm chart.
func (*HelmDatasource) Name ¶
func (d *HelmDatasource) Name() string
Name returns the datasource identifier.
type NPMDatasource ¶
type NPMDatasource struct {
// contains filtered or unexported fields
}
NPMDatasource implements the Datasource interface for the npm registry.
func NewNPMDatasource ¶
func NewNPMDatasource() *NPMDatasource
NewNPMDatasource creates a new npm datasource.
func (*NPMDatasource) GetLatestVersion ¶
GetLatestVersion returns the latest stable version for an npm package.
func (*NPMDatasource) GetPackageInfo ¶
func (d *NPMDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
GetPackageInfo returns detailed information about an npm package.
func (*NPMDatasource) GetVersions ¶
GetVersions returns all available versions for an npm package.
func (*NPMDatasource) Name ¶
func (d *NPMDatasource) Name() string
Name returns the datasource identifier.
type PackageInfo ¶
type PackageInfo struct {
Name string
Description string
Homepage string
Repository string
Versions []VersionInfo
}
PackageInfo contains metadata about a package.
type TerraformDatasource ¶
type TerraformDatasource struct {
// contains filtered or unexported fields
}
TerraformDatasource implements the Datasource interface for the Terraform Registry.
func NewTerraformDatasource ¶
func NewTerraformDatasource() *TerraformDatasource
NewTerraformDatasource creates a new Terraform datasource.
func (*TerraformDatasource) GetLatestVersion ¶
GetLatestVersion returns the latest stable version for a Terraform module or provider.
func (*TerraformDatasource) GetPackageInfo ¶
func (d *TerraformDatasource) GetPackageInfo(ctx context.Context, pkg string) (*PackageInfo, error)
GetPackageInfo returns detailed information about a Terraform module or provider.
func (*TerraformDatasource) GetVersions ¶
GetVersions returns all available versions for a Terraform module or provider.
func (*TerraformDatasource) Name ¶
func (d *TerraformDatasource) Name() string
Name returns the datasource identifier.