opkg

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var OpkgFile = opkgFile{}

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(log *slog.Logger) *Builder

func (*Builder) Build

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

func (*Builder) OutputPath

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

func (*Builder) Platform

func (b *Builder) Platform(p *platform.Platform) *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
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 *ops.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(ski, fingerprint string, key *rsa.PrivateKey) error

type Validator

type Validator struct {
	*slog.Logger
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(logger *slog.Logger, sec security.Security, quiet bool) *Validator

func (*Validator) Validate

func (v *Validator) Validate(path string) error

type Writer

type Writer struct{}

func NewWriter

func NewWriter() *Writer

func (*Writer) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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