client

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	WolfiAPKRepo                = "https://packages.wolfi.dev/os"
	ChainguardEnterpriseAPKRepo = "https://apk.cgr.dev/chainguard-private"
	ChainguardExtrasAPKRepo     = "https://apk.cgr.dev/extra-packages"
)
View Source
const (
	Aarch64Arch = "aarch64"
	X86_64Arch  = "x86_64"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for interacting with an APK package repository.

func New

func New(httpClient *http.Client) *Client

New creates a new Client, suitable for accessing remote APK indexes and packages.

func (Client) GetRemoteIndex

func (c Client) GetRemoteIndex(ctx context.Context, apkRepo, arch string) (*apk.APKIndex, error)

GetRemoteIndex retrieves the index of APK packages from the specified remote repository.

`apkRepo` is the URL of the repository including the protocol, e.g. "https://packages.wolfi.dev/os".

`arch` is the architecture of the index, e.g. "x86_64" or "aarch64".

Jump to

Keyboard shortcuts

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