deb

package
v0.0.0-...-e7d2f50 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ControlDescriptionWrap = 76

ControlDescriptionWrap is the control description text wrapping value.

Variables

View Source
var (
	// ErrInvalidField is an invalid field error.
	ErrInvalidField = errors.New("invalid field")
	// ErrInvalidValue is an invalid value error.
	ErrInvalidValue = errors.New("invalid value")
)

Functions

This section is empty.

Types

type Control

type Control struct {
	Name          string
	Version       string
	Section       string
	Priority      string
	Architecture  string
	Depends       []string
	PreDepends    []string
	Recommends    []string
	Suggests      []string
	Enhances      []string
	Breaks        []string
	Conflicts     []string
	InstalledSize int64
	Maintainer    string
	Description   string
	Homepage      string
}

Control is a Debian control.

func NewControl

func NewControl() *Control

NewControl creates a new Debian control instance.

func (*Control) String

func (c *Control) String() string

String generates a Debian control data string representation.

type Package

type Package struct {
	Name    string
	Arch    string
	Version *Version
	Control *Control
	// contains filtered or unexported fields
}

Package is a Debian package.

func NewPackage

func NewPackage(name, arch, version string, epoch uint, revision int) (*Package, error)

NewPackage creates a new Debian package instance.

func (*Package) AddControlFile

func (p *Package) AddControlFile(name string, r io.Reader, fi os.FileInfo) error

AddControlFile appends a new file to the internal control archive.

func (*Package) AddDir

func (p *Package) AddDir(path string, mode os.FileMode) error

AddDir appends a new directory to the internal data archive.

func (*Package) AddFile

func (p *Package) AddFile(path string, r io.Reader, fi os.FileInfo) error

AddFile appends a new file to the internal data archive.

func (p *Package) AddLink(dst, src string) error

AddLink appends a new symbolic link to the internal data archive.

func (*Package) RegisterConfFile

func (p *Package) RegisterConfFile(path string)

RegisterConfFile registers a new configuration file path.

func (*Package) Write

func (p *Package) Write(w io.Writer) error

Write write the content of the Debian package to a given io.Writer.

type Version

type Version struct {
	Epoch    uint
	Upstream string
	Revision string
}

Version is a Debian package version.

func NewVersion

func NewVersion(epoch uint, upstream, revision string) *Version

NewVersion creates a Debian package version instance.

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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