apt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DecodeSpecifier

func DecodeSpecifier(specifier string) (s []aptSpecifier, err error)

func Fabricate

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

func FabricateVirtual

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

Types

type Repo

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

func (*Repo) Fabricate

func (r *Repo) Fabricate(specSheet repointerface.SpecSheet) (prefabPath string, blueprintPath string, err error)

func (*Repo) FabricateDepend

func (r *Repo) FabricateDepend(item *prefab.Prefab, existVersions []string) (prefabPaths []string, blueprintPaths []string, err error)

func (*Repo) GenerateSpecSheet

func (r *Repo) GenerateSpecSheet(name string, specifier string) (specSheet repointerface.SpecSheet, err error)

func (*Repo) GetEnvs

func (r *Repo) GetEnvs(specSheet repointerface.SpecSheet) (envs []string, err error)

func (*Repo) GetVersions

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

func (*Repo) Init

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

func (*Repo) New

func (r *Repo) New(workDir string, tmpDir string) (err error)

type SpecSheet

type SpecSheet struct {
	SpecType      string `json:"specType"`
	Name_s        string `json:"name"`
	Version_s     string `json:"version"`
	Environment_s string `json:"environment"`
	Specifier     string `json:"specifier"`
	Arch          string `json:"arch"` // e.g. "amd64"
}

func (*SpecSheet) Environment

func (s *SpecSheet) Environment() string

func (*SpecSheet) Name

func (s *SpecSheet) Name() string

func (*SpecSheet) SelectEnv

func (s *SpecSheet) SelectEnv(envs []string) (err error)

select one environment and fill it into [environmet] Warning! no matched environment is not an error, should leave [environment] empty and return nil

func (*SpecSheet) SelectVersion

func (s *SpecSheet) SelectVersion(versions []string) (err error)

1. set [environmet] to "" 2. select one version and fill it into [version] Warning! no matched version is not an error, should leave [version] empty and return nil

func (*SpecSheet) Type

func (s *SpecSheet) Type() string

func (*SpecSheet) Version

func (s *SpecSheet) Version() string

func (*SpecSheet) VersionSpecifier

func (s *SpecSheet) VersionSpecifier() string

Jump to

Keyboard shortcuts

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