Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrEmptyPath = errors.New("empty path") )
Error used when lookup path does not match
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry interface { // Reference returns the address of the file in the entry. Reference() string // Metadata returns the metadata for this entry. Metadata() map[string]string }
Entry is a representation of a single manifest entry.
type Manifest ¶
type Manifest interface { // Add adds a manifest entry to the specified path. Add(string, string, map[string]string) error // Remove removes a manifest entry on the specified path. Remove(string) error // Lookup returns a manifest node entry if one is found in the specified path. Lookup(string) (Entry, error) // HasPrefix tests whether the specified prefix path exists. HasPrefix(string) bool // Length returns an implementation-specific count of elements in the manifest. // For Manifest, this means the number of all the existing entries. Length() int // WalkEntry walks all entries, calling walkFn for each entry in the map. // All errors that arise visiting entries are filtered by walkFn. WalkEntry(string, WalkEntryFunc) error encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
Manifest is a representation of a manifest.
func NewManifest ¶
func NewManifest() Manifest
NewManifest creates a new Manifest struct and returns a pointer to it.
Click to show internal directories.
Click to hide internal directories.