zpkg

package
v0.0.0-...-32759e4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Magic       string = "zpkg66"
	Version     uint8  = 0
	Compression uint8  = 0

	DefaultZpfPath   = "Zpkgfile"
	DefaultTargetDir = "proto"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	*emission.Emitter
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Build

func (b *Builder) Build() (string, *action.Manifest, error)

func (*Builder) OutputPath

func (b *Builder) OutputPath(op string) *Builder

func (*Builder) Restrict

func (b *Builder) Restrict(r bool) *Builder

func (*Builder) Secure

func (b *Builder) Secure(s bool) *Builder

func (*Builder) TargetPath

func (b *Builder) TargetPath(tp string) *Builder

func (*Builder) Version

func (b *Builder) Version(version uint8) *Builder

func (*Builder) WorkPath

func (b *Builder) WorkPath(wp string) *Builder

func (*Builder) ZpfPath

func (b *Builder) ZpfPath(zp string) *Builder
type Header struct {
	Magic       [6]byte `struc:"little"`
	Version     uint8
	Compression uint8

	ManifestLength uint32
}

func NewHeader

func NewHeader(version uint8, compression uint8) *Header

type Reader

type Reader struct {
	Header   *Header
	Manifest *action.Manifest
	Payload  *payload.Reader
	// contains filtered or unexported fields
}

func NewReader

func NewReader(path string, workPath string) *Reader

func (*Reader) Close

func (r *Reader) Close()

func (*Reader) Read

func (r *Reader) Read() error

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(path string, workPath string) *Signer

func (*Signer) Sign

func (s *Signer) Sign(fingerprint string, key *rsa.PrivateKey) error

type Writer

type Writer struct{}

func NewWriter

func NewWriter() *Writer

func (*Writer) Write

func (w *Writer) Write(filename string, header *Header, manifest *action.Manifest, payload *payload.Writer) error

type ZpkgFile

type ZpkgFile struct {
	Bytes []byte
	Path  string
	// contains filtered or unexported fields
}

func (*ZpkgFile) Eval

func (z *ZpkgFile) Eval() (*action.Manifest, error)

func (*ZpkgFile) Load

func (z *ZpkgFile) Load(path string) (*ZpkgFile, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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