deb

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"
)
View Source
const Name = "deb"

Variables

View Source
var (
	ErrMissingControlFile     = errors.New("control file is missing")
	ErrUnsupportedCompression = errors.New("unsupported compression algorithm")
	ErrInvalidName            = errors.New("package name is invalid")
	ErrInvalidVersion         = errors.New("package version is invalid")
	ErrInvalidArchitecture    = errors.New("package architecture is invalid")
)

Functions

func NewClient

func NewClient(registry, repository, distribution, component string, opts ...hclient.Option) (packages.Client, error)

Types

type Metadata

type Metadata struct {
	Maintainer   string   `json:"maintainer,omitempty"`
	ProjectURL   string   `json:"projectURL,omitempty"`
	Description  string   `json:"description,omitempty"`
	Dependencies []string `json:"dependencies,omitempty"`
}

type Package

type Package struct {
	PkgName      string    `json:"name"`
	PkgVersion   string    `json:"version"`
	PkgSize      int64     `json:"size"`
	Architecture string    `json:"architecture"`
	Control      string    `json:"control"`
	Metadata     *Metadata `json:"metadata"`

	Component    string `json:"component"`
	Distribution string `json:"distribution"`
	FilePath     string `json:"filePath"`

	MD5    string `json:"md5"`
	SHA1   string `json:"sha1"`
	SHA256 string `json:"sha256"`
	SHA512 string `json:"sha512"`
	// contains filtered or unexported fields
}

func NewPackage

func NewPackage(r io.Reader, distribution, component string, size int64) (*Package, error)

NewPackage parses the Debian package file https://manpages.debian.org/bullseye/dpkg-dev/deb.5.en.html

func ParseControlFile

func ParseControlFile(r io.Reader) (*Package, error)

ParseControlFile parses a Debian control file to retrieve the metadata

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
	Name      string
	Dist      string
	Component string
}

Jump to

Keyboard shortcuts

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