Documentation
¶
Overview ¶
Package root defines a storage representation for pointers to file trees and associated metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoData = errors.New("requested data not found")
ErrNoData indicates that the requested data do not exist.
Functions ¶
Types ¶
type Options ¶
Options are configurable settings for creating a Root. A nil options pointer provides zero values for all fields.
type Root ¶
type Root struct {
Description string // a human-readable description
FileKey string // the storage key of the file node
IndexKey string // the storage key of the blob index
ChainKey string // the storage key of a predecessor root
// contains filtered or unexported fields
}
A Root records the location of the root of a file tree.
func Decode ¶
Decode decodes a protobuf-encoded root record and associates it with the storage in s.
func New ¶
New constructs a new empty Root associated with the given store. If opts != nil, initial values are set from its contents.
func (*Root) Chain ¶ added in v0.15.2
Chain loads and returns the chained root of r from s, if one exists. If no chained root exists, it returns ErrNoData.
func (*Root) File ¶
File loads and returns the root file of r from s, if one exists. If no file exists, it returns ErrNoData.