package aci
import "github.com/appc/spec/aci"
Index ¶
- Constants
- Variables
- func LoadSignedData(signed io.Reader, kr openpgp.EntityList) ([]byte, error)
- func ValidateArchive(tr *tar.Reader) error
- func ValidateLayout(dir string) error
- func XzReader(r io.Reader) io.ReadCloser
- type ArchiveWriter
- type FileType
Constants ¶
const ( TypeGzip = FileType("gz") TypeBzip2 = FileType("bz2") TypeXz = FileType("xz") TypeTar = FileType("tar") TypeText = FileType("text") TypeUnknown = FileType("unknown") )
const ( // Path to manifest file inside the layout ManifestFile = "manifest" // Path to rootfs directory inside the layout RootfsDir = "rootfs" )
Variables ¶
var ( ErrNoRootFS = errors.New("no rootfs found in layout") ErrNoManifest = errors.New("no image manifest found in layout") )
Functions ¶
func LoadSignedData ¶
LoadSignedData reads PGP encrypted data from the given Reader, using the provided keyring (EntityList). The entire decrypted bytestream is returned, and/or any error encountered. TODO(jonboulle): support symmetric decryption
func ValidateArchive ¶
ValidateLayout takes a *tar.Reader and validates that the layout of the filesystem the reader encapsulates matches that expected by the Application Container Image format. If any errors are encountered during the validation, it will abort and return the first one.
func ValidateLayout ¶
ValidateLayout takes a directory and validates that the layout of the directory matches that expected by the Application Container Image format. If any errors are encountered during the validation, it will abort and return the first one.
func XzReader ¶
func XzReader(r io.Reader) io.ReadCloser
XzReader shells out to a command line xz executable (if available) to decompress the given io.Reader using the xz compression format
Types ¶
type ArchiveWriter ¶
type ArchiveWriter interface { AddFile(path string, hdr *tar.Header, r io.Reader) error Close() error }
ArchiveWriter writes App Container Images. Users wanting to create an ACI or should create an ArchiveWriter and add files to it; the ACI will be written to the underlying tar.Writer
func NewImageWriter ¶
func NewImageWriter(am schema.ImageManifest, w *tar.Writer) ArchiveWriter
NewImageWriter creates a new ArchiveWriter which will generate an App Container Image based on the given manifest and write it to the given tar.Writer
type FileType ¶
type FileType string
func DetectFileType ¶
DetectFileType attempts to detect the type of file that the given reader represents by comparing it against known file signatures (magic numbers)
Source Files ¶
file.go gpg.go layout.go writer.go
- Version
- v0.1.1
- Published
- Dec 11, 2014
- Platform
- windows/amd64
- Imports
- 17 packages
- Last checked
- 20 minutes ago –
Tools for package owners.