pack

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 21

Documentation

Overview

Package pack provides the registry for implementations of Packing algorithms.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBadPacking indicates that the packing code is invalid.
	ErrBadPacking = errors.Str("DirEntry has incorrect Packing value")
)

Functions

func CheckPacking

func CheckPacking(p upspin.Packer, entry *upspin.DirEntry) error

CheckPacking verifies that the DirEntry matches the packing type for Pack and Packlen.

func Lookup

func Lookup(p upspin.Packing) upspin.Packer

Lookup returns the implementation of the specified Packing, or nil if none is registered.

func LookupByName

func LookupByName(name string) upspin.Packer

LookupByName returns the implementation of the specified Packing, or nil if none is registered.

func Register

func Register(packer upspin.Packer) error

Register binds a Packing code to the implementation of its algorithm. It must be called in the init function of a Packer implementation. If multiple calls have the same Packing, Register will panic. TODO: One day, or in other languages, we may be able to bind lazily.

Types

This section is empty.

Directories

Path Synopsis
Package ee implements an elliptic-curve end-to-end encryption packer.
Package ee implements an elliptic-curve end-to-end encryption packer.
Package ei implements an elliptic-curve end-to-end integrity-checked packer.
Package ei implements an elliptic-curve end-to-end integrity-checked packer.
Package internal provides some helpers used by packing implementations.
Package internal provides some helpers used by packing implementations.
packtest
Package packtest provides common functionality used by packer tests.
Package packtest provides common functionality used by packer tests.
Package packutil provides helper functions for DirEntry Packdata computation.
Package packutil provides helper functions for DirEntry Packdata computation.
Package plain is a simple Packing that passes the data untouched.
Package plain is a simple Packing that passes the data untouched.

Jump to

Keyboard shortcuts

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