packfile

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

func NewDecoder

func NewDecoder(rd io.Reader, store storer.EncodedObjectStorer) *Decoder

func (*Decoder) Decode

func (dec *Decoder) Decode() error

Decode from reader and write to object storage

type Encoder

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

func NewEncoder

func NewEncoder(w io.Writer, store storer.EncodedObjectStorer) *Encoder

func (*Encoder) Encode

func (enc *Encoder) Encode(hashes ...plumbing.Hash) ([]byte, error)

Encode walks all hashes collecting them all, writes the header, followed by the entries and then the footer.

type ObjectWalker

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

ObjectWalker walks a hash and makes a callback with each object it walks. This will yield duplicates.

func NewObjectWalker

func NewObjectWalker(objs storer.EncodedObjectStorer) *ObjectWalker

NewObjectWalker instantiates a new object walker with the given store

func (*ObjectWalker) Walk

func (ow *ObjectWalker) Walk(hash plumbing.Hash, cb func(plumbing.EncodedObject) error) error

Walk an object to the beginning of time

Jump to

Keyboard shortcuts

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