Documentation ¶
Index ¶
- Constants
- func Sha256SumReader(r io.Reader) (hash.Hash, error)
- type Asset
- type Bundle
- type Choice
- type Item
- type Line
- type Manifest
- type Metadata
- type Package
- func (p *Package) AsJSON(indent int) ([]byte, error)
- func (p *Package) BuildManifest() (*Manifest, error)
- func (p *Package) GetBundleIdentifier() string
- func (p *Package) GetHashStrings() []string
- func (p *Package) GetKind() string
- func (p *Package) GetPath() string
- func (p *Package) GetTitle() string
- func (p *Package) GetVersion() string
- func (p *Package) ReadFromURL() error
- type PackageReader
- type PkgInfo
- type PkgRef
Constants ¶
View Source
const ReadSizeLimit = 32768
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct { Kind string `plist:"kind" json:"kind"` MD5Size int64 `plist:"md5-size,omitempty" json:"md5_size,omitempty"` MD5s []string `plist:"md5s,omitempty" json:"md5_hash_strings,omitempty"` SHA256Size int64 `plist:"sha256-size,omitempty" json:"sha256_size,omitempty"` SHA256s []string `plist:"sha256s,omitempty" json:"sha256_hash_strings,omitempty"` URL string `plist:"url" json:"url"` }
Asset represents an asset
type Item ¶
type Item struct { Assets []*Asset `plist:"assets" json:"assets"` Metadata *Metadata `plist:"metadata" json:"metadata"` }
Item represents an item
type Manifest ¶
type Manifest struct {
ManifestItems []*Item `plist:"items" json:"manifestItems"`
}
Manifest handles the manifest for install application command
func BuildPackageManifest ¶
func (*Manifest) AsEncodedPlistString ¶
type Metadata ¶
type Metadata struct { BundleIdentifier string `plist:"bundle-identifier" json:"bundle_identifier"` BundleVersion string `plist:"bundle-version" json:"bundle_version"` Kind string `plist:"kind" json:"kind"` Title string `plist:"title" json:"title"` }
Metadata stores the command meta-data
type Package ¶
type Package struct { Choice Choice `xml:"choice"` PkgInfo PkgInfo `xml:"pkg-info"` PkgRef []PkgRef `xml:"pkg-ref"` Title string `xml:"title"` Hashes []hash.Hash URL string Size int64 // Resource info ContentLength int64 Etag string // contains filtered or unexported fields }
func NewPackage ¶
func NewPackage(pr PackageReader, hashTypeSize uint, hashChunkSize int64) *Package
func ReadPkgFile ¶
func (*Package) BuildManifest ¶
func (*Package) GetBundleIdentifier ¶
func (*Package) GetHashStrings ¶
func (*Package) GetVersion ¶
func (*Package) ReadFromURL ¶
type PackageReader ¶
Click to show internal directories.
Click to hide internal directories.