info

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

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

func (*Dependency) DebFormat

func (dep *Dependency) DebFormat() string

func (*Dependency) RpmFormat

func (dep *Dependency) RpmFormat() string

func (*Dependency) UnmarshalYAML

func (dep *Dependency) UnmarshalYAML(value *yaml.Node) error

type Package

type Package struct {
	Meta PackageMeta `yaml:"meta"`

	Dirs  []PackageDir             `yaml:"directory"`
	Files map[string][]PackageFile `yaml:"files"`

	PreIn  []string `yaml:"prein"`
	PostIn []string `yaml:"postin"`

	PreUn  []string `yaml:"preun"`
	PostUn []string `yaml:"postun"`

	Dependencies []Dependency `yaml:"dependencies"`
	// contains filtered or unexported fields
}

func LoadPkgInfo

func LoadPkgInfo(filepath string, srcHome string) (*Package, error)

func NewPackage

func NewPackage(meta PackageMeta, srcHome string) *Package

func (*Package) AddDirectory

func (pkg *Package) AddDirectory(pkgDir PackageDir)

func (*Package) AddFile

func (pkg *Package) AddFile(fileType string, pkgFile PackageFile) error

func (*Package) AppendPostIn

func (pkg *Package) AppendPostIn(script string)

func (*Package) AppendPostUn

func (pkg *Package) AppendPostUn(script string)

func (*Package) AppendPreIn

func (pkg *Package) AppendPreIn(script string)

Setters

func (*Package) AppendPreUn

func (pkg *Package) AppendPreUn(script string)

func (*Package) PostInScript

func (pkg *Package) PostInScript() string

func (*Package) PostUnScript

func (pkg *Package) PostUnScript() string

func (*Package) PreInScript

func (pkg *Package) PreInScript() string

Getter

func (*Package) PreUnScript

func (pkg *Package) PreUnScript() string

type PackageDir

type PackageDir struct {
	Dest  string `yaml:"dest,omitempty"`
	Mode  uint   `yaml:"mode"`
	Owner string `yaml:"owner"`
	Group string `yaml:"group"`
}

type PackageFile

type PackageFile struct {
	Dest  string    `yaml:"dest,omitempty"`
	Src   string    `yaml:"source"`
	Body  string    `yaml:"body"`
	Mode  uint      `yaml:"mode"`
	Owner string    `yaml:"owner"`
	Group string    `yaml:"group"`
	MTime time.Time `yaml:"mtime"`
}

func (*PackageFile) FileData

func (file *PackageFile) FileData() []byte

func (*PackageFile) FileMTime

func (file *PackageFile) FileMTime() time.Time

func (*PackageFile) FileMode

func (file *PackageFile) FileMode() uint

type PackageMeta

type PackageMeta struct {
	Name    string `yaml:"name,omitempty"`
	Version string `yaml:"version,omitempty"`
	Release string `yaml:"release,omitempty"`
	Arch    string `yaml:"arch,omitempty"`

	Summary     string `yaml:"summary"`
	Description string `yaml:"desc"`

	OS     string `yaml:"os,omitempty"`
	Vendor string `yaml:"vendor,omitempty"`

	URL     string `yaml:"url,omitempty"`
	License string `yaml:"license,omitempty"`

	Maintainer string `yaml:"maintainer,omitempty"`
	// contains filtered or unexported fields
}

func (*PackageMeta) BuildTime

func (meta *PackageMeta) BuildTime() time.Time

func (*PackageMeta) UpdateBuildTime

func (meta *PackageMeta) UpdateBuildTime(buildTime time.Time)

Jump to

Keyboard shortcuts

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