Documentation
¶
Overview ¶
Package apk provides a registry client for Alpine APK repositories.
Index ¶
- Constants
- Variables
- type Registry
- func (r *Registry) Ecosystem() string
- func (r *Registry) FetchDependencies(ctx context.Context, name, version string) ([]core.Dependency, error)
- func (r *Registry) FetchMaintainers(ctx context.Context, name string) ([]core.Maintainer, error)
- func (r *Registry) FetchPackage(ctx context.Context, name string) (*core.Package, error)
- func (r *Registry) FetchVersions(ctx context.Context, name string) ([]core.Version, error)
- func (r *Registry) URLs() core.URLBuilder
- type URLs
Constants ¶
View Source
const (
DefaultURL = ""
)
Variables ¶
View Source
var ( // ErrV3IndexUnsupported is returned when a repository publishes a v3 // Packages.adb index, which this client does not decode yet. ErrV3IndexUnsupported = errors.New("apk v3 Packages.adb indexes are not supported") // ErrMalformedIndex is returned for indexes that cannot be parsed. ErrMalformedIndex = errors.New("malformed APKINDEX") )
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry reads one repository architecture directory, such as https://dl-cdn.alpinelinux.org/alpine/v3.23/main/x86_64, or an exact index URL inside one. The release, component and architecture are never inferred from a higher-level mirror URL.
The index is downloaded once per Registry and kept for its lifetime, so callers looking up many packages should reuse one Registry per repository.
func (*Registry) FetchDependencies ¶
func (*Registry) FetchMaintainers ¶
func (*Registry) FetchPackage ¶
func (*Registry) FetchVersions ¶
func (*Registry) URLs ¶
func (r *Registry) URLs() core.URLBuilder
Click to show internal directories.
Click to hide internal directories.