Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidDeb = errors.New("header doesn't look right, mybe not archive")
)
Functions ¶
Types ¶
type ArItem ¶
type ArItem struct { Name string `json:"name"` Ext string `json:"ext"` Data *io.SectionReader `json:"-"` Offset int64 `json:"offset"` Size int64 `json:"size"` }
ArItem ar归档中的条目
type Deb ¶
type Deb struct { Control *Control Data *ArItem ControlExt string `json:"control_ext"` DataExt string `json:"data_ext"` ArItem map[string]*ArItem }
Deb deb包结构
type DecompressFunc ¶
type DecompressFunc func(io.Reader) (io.ReadCloser, error)
DecompressFunc 解压函数
type Package ¶
type Package struct { Package string `json:"package" field:"Package"` //mandatory Source string `json:"source,omitempty" field:"Source"` Version string `json:"version" field:"Version"` //mandatory Section string `json:"section" field:"Section"` //recommended Priority string `json:"priority" field:"Priority"` //recommended Architecture string `json:"architecture" field:"Architecture"` //mandatory Essential string `json:"essential,omitempty" field:"Essential"` Depends string `json:"depends,omitempty" field:"Depends"` Recommends string `json:"recommends,omitempty" field:"Recommends"` Suggests string `json:"suggests,omitempty" field:"Suggests"` Enhances string `json:"enhances,omitempty" field:"Enhances"` PreDepends string `json:"pre_depends,omitempty" field:"Pre-Depends"` InstalledSize int64 `json:"installed_size,omitempty" field:"Installed-Size"` Maintainer string `json:"maintainer" field:"Maintainer"` //mandatory Description string `json:"description" field:"Description"` //mandatory Homepage string `json:"homepage,omitempty" field:"Homepage"` Opts string `json:"opts,omitempty" field:"-"` Raw map[string]string `json:"raw,omitempty" field:"-"` RawText string `json:"-" field:"-"` }
Package 包头Control解析, 解析为 <key> <-> <value>字典后转换为Package结构体 未识别的字段保存在Opts中, Raw为原始数据 该方法保证不出错地且不校验语法地解析出所有字段 其<key>和<value>均删除了收尾空格(如果有)
Click to show internal directories.
Click to hide internal directories.