archive

package
v0.0.0-...-cdd7993 Latest Latest
Warning

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

Go to latest
Published: May 27, 2016 License: GPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

Variables

View Source
var (
	ErrShortCopy = errors.New("archive: short copy")
)

Functions

func Verify

func Verify(r io.Reader, key []byte) (bool, error)

Types

type Archive

type Archive struct {
	xchacha20poly1305.XChaCha20Poly1305

	io.Reader
	io.Writer
	// contains filtered or unexported fields
}

func NewArchiveForWriter

func NewArchiveForWriter(w io.Writer, key []byte) (*Archive, error)

func NewArchiveFromReader

func NewArchiveFromReader(r io.Reader, key []byte) (*Archive, error)

func (*Archive) Read

func (a *Archive) Read(b []byte) (int, error)

func (*Archive) Verify

func (a *Archive) Verify() bool

func (*Archive) Write

func (a *Archive) Write(b []byte) (int, error)

type Reader

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

func NewReader

func NewReader(r io.Reader, key []byte) (*Reader, error)

func (*Reader) Next

func (r *Reader) Next() (*tar.Header, error)

func (*Reader) Read

func (r *Reader) Read(b []byte) (int, error)

func (*Reader) Verify

func (r *Reader) Verify() bool

type Writer

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

func NewWriter

func NewWriter(w io.Writer, key []byte) (*Writer, error)

func (*Writer) Add

func (w *Writer) Add(header *tar.Header) error

func (*Writer) Copy

func (w *Writer) Copy(r io.Reader, size int64) error

func (*Writer) Finish

func (w *Writer) Finish() ([]byte, error)

Jump to

Keyboard shortcuts

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