apk

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepositoryPublicKey  = "repository.key"
	RepositoryPrivateKey = "private.key"
	IndexFilename        = "APKINDEX.tar.gz"
)
View Source
const Name = "apk"

Variables

View Source
var (
	ErrMissingPKGINFOFile = errors.New("PKGINFO file is missing")
	ErrInvalidName        = errors.New("package name is invalid")
	ErrInvalidVersion     = errors.New("package version is invalid")
)

Functions

func NewClient

func NewClient(registry, repository, branch, repo string, opts ...hclient.Option) (packages.Client, error)

Types

type FileMetadata

type FileMetadata struct {
	Checksum     string   `json:"checksum"`
	Packager     string   `json:"packager,omitempty"`
	BuildDate    int64    `json:"buildDate,omitempty"`
	Size         int64    `json:"size,omitempty"`
	Architecture string   `json:"architecture,omitempty"`
	Origin       string   `json:"origin,omitempty"`
	CommitHash   string   `json:"commitHash,omitempty"`
	InstallIf    string   `json:"installIf,omitempty"`
	Provides     []string `json:"provides,omitempty"`
	Dependencies []string `json:"dependencies,omitempty"`
}

type Package

type Package struct {
	PkgName         string          `json:"name"`
	PkgVersion      string          `json:"version"`
	VersionMetadata VersionMetadata `json:"versionMetadata"`
	FileMetadata    FileMetadata    `json:"fileMetadata"`

	PkgSize   int64  `json:"size"`
	PkgDigest string `json:"digest"`
	Branch    string `json:"branch"`
	Repo      string `json:"repo"`
	FilePath  string `json:"filePath"`
	// contains filtered or unexported fields
}

Package represents an Alpine package

func NewPackage

func NewPackage(r io.Reader, branch, repository string, size int64) (*Package, error)

NewPackage parses the Alpine package file

func ParsePackageInfo

func ParsePackageInfo(r io.Reader, branch, repository string) (*Package, error)

ParsePackageInfo parses a PKGINFO file to retrieve the metadata of an Alpine package

func (*Package) Arch

func (p *Package) Arch() string

func (*Package) Close

func (p *Package) Close() error

func (*Package) Digest

func (p *Package) Digest() digest.Digest

func (*Package) Name

func (p *Package) Name() string

func (*Package) Path

func (p *Package) Path() string

func (*Package) Read

func (p *Package) Read(b []byte) (n int, err error)

func (*Package) Size

func (p *Package) Size() int64

func (*Package) Version

func (p *Package) Version() string

type SetupArgs

type SetupArgs struct {
	User       string
	Password   string
	Scheme     string
	Host       string
	Path       string
	Branch     string
	Repository string
}

type VersionMetadata

type VersionMetadata struct {
	Maintainer  string `json:"maintainer,omitempty"`
	ProjectURL  string `json:"projectURL,omitempty"`
	Description string `json:"description,omitempty"`
	License     string `json:"license,omitempty"`
}

Metadata of an Alpine package

Jump to

Keyboard shortcuts

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