apt

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const VIRTUAL_PKG_ENVIRONMENT = "all"
View Source
const VIRTUAL_PKG_VERSION = "~"

Variables

View Source
var NullVersion = Version{Epoch: -1}

Functions

func DecodeSpecifier

func DecodeSpecifier(specifier string) (c repointerface.Constraint, err error)

func Fabricate

func Fabricate(path string, dstDir string) (prefabPath string, blueprintPath string, err error)

func FabricateVirtual

func FabricateVirtual(name string, dstDir string) (prefabPath string, blueprintPath string, err error)

func NameNormalizer added in v0.2.2

func NameNormalizer(name string) (normalized string)

Types

type EnvSpec added in v0.2.2

type EnvSpec struct {
	Arch string `json:"arch"` // e.g. "amd64"
}

func DecodeEnvSpec added in v0.2.2

func DecodeEnvSpec(s string) (es EnvSpec, err error)

func (EnvSpec) Encode added in v0.2.2

func (es EnvSpec) Encode() string

type Repo

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

func (*Repo) Fabricate

func (r *Repo) Fabricate(name string, version repointerface.Version, envs []string, dstDir string) (prefabPaths []string, blueprintPaths []string, fileType string, err error)

func (*Repo) FilterEnv added in v0.2.2

func (r *Repo) FilterEnv(envs []string) (selected []string)

func (*Repo) GetEnvSpec added in v0.2.2

func (r *Repo) GetEnvSpec() repointerface.EnvSpec

func (*Repo) GetEnvs

func (r *Repo) GetEnvs(name string, version repointerface.Version) (envs []string, err error)

func (*Repo) GetVersions

func (r *Repo) GetVersions(name string) (versions []repointerface.Version, err error)

func (*Repo) Init

func (r *Repo) Init(ctx *dcontext.DeployContext) (err error)

func (*Repo) SelectEnv added in v0.2.2

func (r *Repo) SelectEnv(envs []string, envSpec repointerface.EnvSpec) (selected string, err error)

func (*Repo) SelectVersion added in v0.2.2

func (r *Repo) SelectVersion(versions []repointerface.Version) (selected repointerface.Version, err error)

type Version added in v0.2.2

type Version struct {
	Epoch           int
	UpstreamVersion string
	DebianRevision  string
}

func ParseVersion added in v0.2.2

func ParseVersion(version string) (ver Version, err error)

parse debian package version string, the format is [epoch:]upstream_version[-debian_revision]

func (Version) Compare added in v0.2.2

func (a Version) Compare(other repointerface.Version) (result int)

func (Version) String added in v0.2.2

func (v Version) String() string

Jump to

Keyboard shortcuts

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