Documentation ¶
Index ¶
- Constants
- func BytesToInt64(b []byte) int64
- func BytesToUint64(b []byte) uint64
- func GetArchivePathPrefixToBundles(repo string) string
- func GetArchivePathPrefixToLabels(repo string, prefixes ...string) string
- func GetArchivePathPrefixToRepos() string
- func GetArchivePathToBundle(repo string, bundleID string) string
- func GetArchivePathToBundleFileList(repo string, bundleID string, index uint64) string
- func GetArchivePathToLabel(repo string, labelName string) string
- func GetArchivePathToRepoDescriptor(repo string) string
- func GetBundleTimeStamp() time.Time
- func GetConsumablePathToBundle(bundleID string) string
- func GetConsumablePathToBundleFileList(bundleID string, index uint64) string
- func Int64ToBytes(u *int64) []byte
- func IsGeneratedFile(file string) bool
- func Uint64ToBytes(u *uint64) []byte
- func UnsafeBytesToString(b []byte) string
- func UnsafeStringToBytes(s string) []byte
- func Validate(repo RepoDescriptor) error
- type ArchivePathComponents
- type BundleDescriptor
- type BundleDescriptors
- type BundleEntries
- type BundleEntry
- type ConsumableStorePathMetadata
- type ConsumableStorePathMetadataErr
- type Contributor
- type LabelDescriptor
- type LabelDescriptors
- type RepoDescriptor
- type RepoDescriptors
Constants ¶
const ( ConsumableStorePathTypeDescriptor = iota ConsumableStorePathTypeFileList )
const (
CurrentBundleVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func BytesToInt64 ¶
func BytesToUint64 ¶
func GetArchivePathPrefixToRepos ¶
func GetArchivePathPrefixToRepos() string
func GetArchivePathToBundle ¶
func GetArchivePathToLabel ¶
func GetArchivePathToRepoDescriptor ¶
GetArchivePathToRepoDescriptor returns the path for a repo descriptor
func GetBundleTimeStamp ¶
func Int64ToBytes ¶
func IsGeneratedFile ¶
func Uint64ToBytes ¶
func UnsafeBytesToString ¶
UnsafeBytesToString converts []byte to string without a memcopy
func UnsafeStringToBytes ¶
UnsafeStringToBytes converts strings to []byte without memcopy
func Validate ¶
func Validate(repo RepoDescriptor) error
Types ¶
type ArchivePathComponents ¶
type ArchivePathComponents struct { Repo string BundleID string ArchiveFileName string LabelName string }
func GetArchivePathComponents ¶
func GetArchivePathComponents(archivePath string) (ArchivePathComponents, error)
this function's design is converging on being able to return something meaningful * given any path in the metadata archive, not just those corresponding to bundles. * * the return value might be changed to an interface type in later iterations.
type BundleDescriptor ¶
type BundleDescriptor struct { LeafSize uint32 `json:"leafSize" yaml:"leafSize"` // Each bundles blobs are independently generated ID string `json:"id" yaml:"id"` Message string `json:"message" yaml:"message"` Parents []string `json:"parents,omitempty" yaml:"parents,omitempty"` Timestamp time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"` Contributors []Contributor `json:"contributors" yaml:"contributors"` BundleEntriesFileCount uint64 `json:"count" yaml:"count"` // Number of files which have BundleDescriptor Entries Version uint64 `json:"version,omitempty" yaml:"version,omitempty"` // Version for the bundle // contains filtered or unexported fields }
BundleDescriptor represents a commit which is a file tree with the changes to the repository.
type BundleDescriptors ¶
type BundleDescriptors []BundleDescriptor
BundleDescriptors is a sortable slice of BundleDescriptor
func (BundleDescriptors) Last ¶
func (b BundleDescriptors) Last() BundleDescriptor
func (BundleDescriptors) Len ¶
func (b BundleDescriptors) Len() int
func (BundleDescriptors) Less ¶
func (b BundleDescriptors) Less(i, j int) bool
func (BundleDescriptors) Swap ¶
func (b BundleDescriptors) Swap(i, j int)
type BundleEntries ¶
type BundleEntries struct { BundleEntries []BundleEntry `json:"BundleEntries" yaml:"BundleEntries"` // contains filtered or unexported fields }
List of files part of a bundle.
type BundleEntry ¶
type BundleEntry struct { Hash string `json:"hash" yaml:"hash"` NameWithPath string `json:"name" yaml:"name"` FileMode os.FileMode `json:"mode" yaml:"mode"` Size uint64 `json:"size" yaml:"size"` // contains filtered or unexported fields }
List of files, directories (empty) skipped
type ConsumableStorePathMetadata ¶
func GetConsumableStorePathMetadata ¶
func GetConsumableStorePathMetadata(path string) (ConsumableStorePathMetadata, error)
*
- this function is the inverse of GetConsumablePath* functions.
- the GetConsumablePath* functions return bundle.ConsumableStore keys (paths)
- given some parameters from the bundle.
- this function, given one of the paths returned by a GetConsumablePath* function,
- parses the path and returns the input values to that function.
type ConsumableStorePathMetadataErr ¶
type ConsumableStorePathMetadataErr struct {
// contains filtered or unexported fields
}
func (ConsumableStorePathMetadataErr) Error ¶
func (e ConsumableStorePathMetadataErr) Error() string
type Contributor ¶
type Contributor struct { Name string `json:"name" yaml:"name"` Email string `json:"email" yaml:"email"` // contains filtered or unexported fields }
Contributor who created the object
func (*Contributor) String ¶
func (c *Contributor) String() string
type LabelDescriptor ¶
type LabelDescriptor struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` BundleID string `json:"id" yaml:"id"` Timestamp time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"` Contributors []Contributor `json:"contributors" yaml:"contributors"` // contains filtered or unexported fields }
type LabelDescriptors ¶
type LabelDescriptors []LabelDescriptor
LabelDescriptors is a sortable slice of LabelDescriptor
func (LabelDescriptors) Last ¶
func (b LabelDescriptors) Last() LabelDescriptor
func (LabelDescriptors) Len ¶
func (b LabelDescriptors) Len() int
func (LabelDescriptors) Less ¶
func (b LabelDescriptors) Less(i, j int) bool
func (LabelDescriptors) Swap ¶
func (b LabelDescriptors) Swap(i, j int)
type RepoDescriptor ¶
type RepoDescriptor struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Timestamp time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"` Contributor Contributor `json:"contributor,omitempty" yaml:"contributor,omitempty"` }
RepoDescriptor represents a commit which is a file tree with the changes to the repository.
type RepoDescriptors ¶
type RepoDescriptors []RepoDescriptor
RepoDescriptors is a sortable slice of RepoDescriptor
func (RepoDescriptors) Last ¶
func (b RepoDescriptors) Last() RepoDescriptor
Last return the last entry in a slice of RepoDescriptors
func (RepoDescriptors) Len ¶
func (b RepoDescriptors) Len() int
func (RepoDescriptors) Less ¶
func (b RepoDescriptors) Less(i, j int) bool
func (RepoDescriptors) Swap ¶
func (b RepoDescriptors) Swap(i, j int)