Documentation
¶
Index ¶
- Constants
- func GetPermissionFromPath(file string) int64
- type Change
- type Compiler
- type Decoder
- type DecoderConfig
- type Dependency
- type Environ
- type Maintainer
- type Package
- func (p *Package) Breaks() []Dependency
- func (p *Package) Conflicts() []Dependency
- func (p *Package) Enhances() []Dependency
- func (p *Package) GetDirDoc(file string) string
- func (p *Package) OnlyDocs() *Package
- func (p *Package) PackageName() string
- func (p *Package) Provides() []Dependency
- func (p *Package) Recommends() []Dependency
- func (p *Package) Replaces() []Dependency
- func (p *Package) Requires() []Dependency
- func (p *Package) Split() []*Package
- func (p *Package) Suggests() []Dependency
- func (p *Package) TotalSize() int64
- type Position
- type Resource
- type Scanner
- type Token
Constants ¶
View Source
const ( Deb = "deb" Rpm = "rpm" Apk = "apk" )
View Source
const ( Arch64 = "amd64" Arch32 = "i386" ArchAll = "all" ArchNo = "noarch" )
View Source
const ( PermFile = 0o644 PermExec = 0o755 PermDir = 0o755 )
View Source
const ( DirEtc = "etc" DirVar = "var" DirLog = "var/log" DirOpt = "opt" DirBin = "bin" DirBinUsr = "usr/bin" DirDoc = "usr/share/doc" )
View Source
const ( EnvMaintainerName = "PACK_MAINTAINER_NAME" EnvMaintainerMail = "PACK_MAINTAINER_MAIL" )
View Source
const ( EnvArchive = "archive" EnvBash = "bash" EnvShell = "shell" )
View Source
const ( DefaultVersion = "0.1.0" DefaultLicense = "mit" DefaultSection = "utils" DefaultPriority = "optional" DefaultOS = "linux" DefaultShell = "/bin/sh" DefaultUser = "root" DefaultGroup = "root" )
View Source
const ( ConstraintEq = "eq" ConstraintNe = "ne" ConstraintGt = "gt" ConstraintGe = "ge" ConstraintLt = "lt" ConstraintLe = "le" )
View Source
const ( FileFlagConf = 1 << 0 FileFlagDoc = 1 << 1 FileFlagAllowMissing = 1 << 3 FileFlagNoReplace = 1 << 4 FileFlagGhost = 1 << 6 FileFlagLicense = 1 << 7 FileFlagReadme = 1 << 8 FileFlagExec = 1 << 9 FileFlagDir = 1 << 12 FileFlagRegular = FileFlagConf | FileFlagDoc | FileFlagLicense | FileFlagReadme )
View Source
const ( EOF rune = -(1 << iota) EOL Comment LocalVar EnvVar Literal String Heredoc Template Number Boolean BegObj EndObj BegArr EndArr BegGrp EndGrp Comma Macro Invalid )
Variables ¶
This section is empty.
Functions ¶
func GetPermissionFromPath ¶
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoder(context string, config *DecoderConfig) (*Decoder, error)
func (*Decoder) DecodeInto ¶ added in v0.3.2
type DecoderConfig ¶ added in v0.3.2
type Dependency ¶
type Maintainer ¶
type Package ¶
type Package struct {
Setup string
Teardown string
Name string
Summary string
Desc string
Version string
Release string
Home string
Vendor string
Distrib string
BuildWith Compiler
PackageType string
Essential bool
Arch string
Os string
Section string
Priority string
License string
PreInst string
PostInst string
PreRem string
PostRem string
CheckScript string
Maintainer Maintainer
Depends []Dependency
Changes []Change
Digest int
Files []Resource
}
func (*Package) Breaks ¶
func (p *Package) Breaks() []Dependency
func (*Package) Conflicts ¶
func (p *Package) Conflicts() []Dependency
func (*Package) Enhances ¶
func (p *Package) Enhances() []Dependency
func (*Package) PackageName ¶
func (*Package) Provides ¶
func (p *Package) Provides() []Dependency
func (*Package) Recommends ¶
func (p *Package) Recommends() []Dependency
func (*Package) Replaces ¶
func (p *Package) Replaces() []Dependency
func (*Package) Requires ¶
func (p *Package) Requires() []Dependency
func (*Package) Suggests ¶
func (p *Package) Suggests() []Dependency
type Resource ¶
type Resource struct {
Path string
Local io.ReadCloser
Target string
Perm int64
Compress bool
Flags int64
Size int64
Lastmod time.Time
Hash string
}
func (Resource) IsDirectory ¶
Click to show internal directories.
Click to hide internal directories.