appmanifest

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

package appmanifest provides utilities for managing app manifest files used by MDM InstallApplication commands.

Index

Constants

View Source
const DefaultMD5Size = 10 << 20 // 10MB

DefaultMD5Size is the default size of each file chunk that needs to be hashed

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Kind    string   `plist:"kind"`
	MD5Size int64    `plist:"md5-size"`
	MD5s    []string `plist:"md5s"`
	URL     string   `plist:"url"`
}

type BundleInfo

type BundleInfo struct {
	BundleIdentifier string `plist:"bundle-identifier"`
	BundleVersion    string `plist:"bundle-version"`
}

type File

type File interface {
	io.Reader
	Size() int64
}

File is an io.Reader which knows its size.

type Item

type Item struct {
	Assets []Asset `plist:"assets"`
	// Apple claims the metadata struct is required,
	// but testing shows otherwise.
	Metadata *Metadata `plist:"metadata,omitempty"`
}

type Manifest

type Manifest struct {
	ManifestItems []Item `plist:"items"`
}

http://help.apple.com/deployment/osx/#/ior5df10f73a

func Create

func Create(file File, url string, opts ...Option) (*Manifest, error)

Create an AppManifest and write it to an io.Writer.

type Metadata

type Metadata struct {
	BundleInfo
	Items    []BundleInfo `plist:"items,omitempty"`
	Kind     string       `plist:"kind"`
	Subtitle string       `plist:"subtitle"`
	Title    string       `plist:"title"`
}

type Option

type Option func(*config)

func WithMD5Size

func WithMD5Size(md5Size int64) Option

WithMD5Size overrides the DefaultMD5Size when creating an AppManifest.

Jump to

Keyboard shortcuts

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